diff options
author | Karel Zak | 2017-09-19 13:48:52 +0200 |
---|---|---|
committer | Karel Zak | 2017-09-19 13:48:52 +0200 |
commit | e163adb83bedb28a4eb3602ae5d6f5769d9d0327 (patch) | |
tree | bbbf7618c576d64ae977590f649c78273c085d9d /libfdisk | |
parent | build-sys: make rfkill optional (and enabled by default) (diff) | |
download | kernel-qcow2-util-linux-e163adb83bedb28a4eb3602ae5d6f5769d9d0327.tar.gz kernel-qcow2-util-linux-e163adb83bedb28a4eb3602ae5d6f5769d9d0327.tar.xz kernel-qcow2-util-linux-e163adb83bedb28a4eb3602ae5d6f5769d9d0327.zip |
build-sys: fix non-blkid compilation
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libfdisk')
-rw-r--r-- | libfdisk/src/wipe.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/libfdisk/src/wipe.c b/libfdisk/src/wipe.c index 617383024..ab1d7b851 100644 --- a/libfdisk/src/wipe.c +++ b/libfdisk/src/wipe.c @@ -97,9 +97,14 @@ int fdisk_set_wipe_area(struct fdisk_context *cxt, return 0; } +#ifndef HAVE_LIBBLKID +int fdisk_do_wipe(struct fdisk_context *cxt __attribute__((__unused__))) +{ + return 0; +} +#else int fdisk_do_wipe(struct fdisk_context *cxt) { -#ifdef HAVE_LIBBLKID struct list_head *p; blkid_probe pr; int rc; @@ -140,9 +145,9 @@ int fdisk_do_wipe(struct fdisk_context *cxt) } blkid_free_probe(pr); -#endif return 0; } +#endif /* @@ -150,9 +155,14 @@ int fdisk_do_wipe(struct fdisk_context *cxt) * * Returns: 0 if nothing found, < 0 on error, 1 if found a signature */ +#ifndef HAVE_LIBBLKID +int fdisk_check_collisions(struct fdisk_context *cxt __attribute__((__unused__))) +{ + return 0; +} +#else int fdisk_check_collisions(struct fdisk_context *cxt) { -#ifdef HAVE_LIBBLKID int rc = 0; blkid_probe pr; @@ -195,8 +205,5 @@ int fdisk_check_collisions(struct fdisk_context *cxt) blkid_free_probe(pr); return rc; -#else - return 0; -#endif } - +#endif |