diff options
author | Karel Zak | 2009-02-06 22:23:13 +0100 |
---|---|---|
committer | Karel Zak | 2009-02-06 22:23:13 +0100 |
commit | 525dd3163586a47f2c91abb749d436b5cf4f7dd9 (patch) | |
tree | 610559e2b2502e83c8c63cb6b049069629c578fd | |
parent | agetty: check for termios.c_line struct member by autoconf (diff) | |
download | kernel-qcow2-util-linux-525dd3163586a47f2c91abb749d436b5cf4f7dd9.tar.gz kernel-qcow2-util-linux-525dd3163586a47f2c91abb749d436b5cf4f7dd9.tar.xz kernel-qcow2-util-linux-525dd3163586a47f2c91abb749d436b5cf4f7dd9.zip |
fdisk: cleanup _PATH_DEV_* macros
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r-- | fdisk/common.h | 4 | ||||
-rw-r--r-- | fdisk/partname.c | 5 | ||||
-rw-r--r-- | include/pathnames.h | 2 |
3 files changed, 5 insertions, 6 deletions
diff --git a/fdisk/common.h b/fdisk/common.h index 380bbc39c..674e65f4a 100644 --- a/fdisk/common.h +++ b/fdisk/common.h @@ -3,10 +3,6 @@ /* 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; diff --git a/fdisk/partname.c b/fdisk/partname.c index 2d629edfe..889e7f0b2 100644 --- a/fdisk/partname.c +++ b/fdisk/partname.c @@ -5,6 +5,7 @@ #include <fcntl.h> #include <unistd.h> #include "blkdev.h" +#include "pathnames.h" #include "common.h" /* @@ -31,8 +32,8 @@ partname(char *dev, int pno, int lth) { /* 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"; } diff --git a/include/pathnames.h b/include/pathnames.h index ad35bf91e..0060a756f 100644 --- a/include/pathnames.h +++ b/include/pathnames.h @@ -97,6 +97,8 @@ /* 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 */ |