Signed-off-by: Karel Zak <kzak@redhat.com>
/* common stuff for fdisk, cfdisk, sfdisk */
-/* udev paths */
-#define PATH_DEV_BYID "/dev/disk/by-id"
-#define PATH_DEV_BYPATH "/dev/disk/by-path"
-
struct systypes {
unsigned char type;
char *name;
#include <fcntl.h>
#include <unistd.h>
#include "blkdev.h"
+#include "pathnames.h"
#include "common.h"
/*
/* udev names partitions by appending -partN
e.g. ata-SAMSUNG_SV8004H_0357J1FT712448-part1 */
- if ((strncmp(dev, PATH_DEV_BYID, strlen(PATH_DEV_BYID)) == 0) ||
- strncmp(dev, PATH_DEV_BYPATH, strlen(PATH_DEV_BYPATH)) == 0) {
+ if ((strncmp(dev, _PATH_DEV_BYID, strlen(_PATH_DEV_BYID)) == 0) ||
+ strncmp(dev, _PATH_DEV_BYPATH, strlen(_PATH_DEV_BYPATH)) == 0) {
p = "-part";
}
/* udev paths */
#define _PATH_DEV_BYLABEL "/dev/disk/by-label"
#define _PATH_DEV_BYUUID "/dev/disk/by-uuid"
+#define _PATH_DEV_BYID "/dev/disk/by-id"
+#define _PATH_DEV_BYPATH "/dev/disk/by-path"
#endif /* PATHNAMES_H */