mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-13 03:40:05 +01:00
Fix deferred remove test failure on non-udev systems.
Deferred remove non-udev enabled libdevmapper removes device mapper symlinks immediately. We have to check device size from sysfs attributes.
This commit is contained in:
committed by
Milan Broz
parent
26679e223c
commit
53b22cc32e
@@ -96,6 +96,8 @@ void xlog(const char *msg, const char *tst, const char *func, int line, const ch
|
||||
|
||||
#define CRYPT_FREE(x) do { crypt_free(x); x = NULL; } while (0)
|
||||
|
||||
#define DMDIR "/dev/mapper/"
|
||||
|
||||
#define TST_SECTOR_SHIFT 9L
|
||||
#define TST_SECTOR_SIZE 512
|
||||
#define TST_LOOP_FILE_SIZE (((1 << 20) * 100) >> TST_SECTOR_SHIFT)
|
||||
@@ -124,4 +126,7 @@ int loop_attach(char **loop, const char *file, int offset,
|
||||
int autoclear, int *readonly);
|
||||
int loop_detach(const char *loop);
|
||||
|
||||
int t_device_size_by_devno(dev_t devno, uint64_t *retval);
|
||||
int t_get_devno(const char *dev, dev_t *devno);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user