diff options
author | Karel Zak | 2009-09-21 15:39:00 +0200 |
---|---|---|
committer | Karel Zak | 2009-09-21 15:39:00 +0200 |
commit | 79e1f9f15cea3d81aeea64a89610b6ed72fd310e (patch) | |
tree | 1aafa7539b148e194a614597befc4ea933bbdf4c /shlibs/blkid/samples/mkfs.c | |
parent | libblkid: add EVMS topology support (for old kernels) (diff) | |
download | kernel-qcow2-util-linux-79e1f9f15cea3d81aeea64a89610b6ed72fd310e.tar.gz kernel-qcow2-util-linux-79e1f9f15cea3d81aeea64a89610b6ed72fd310e.tar.xz kernel-qcow2-util-linux-79e1f9f15cea3d81aeea64a89610b6ed72fd310e.zip |
libblkid: minor changes to samples
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'shlibs/blkid/samples/mkfs.c')
-rw-r--r-- | shlibs/blkid/samples/mkfs.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/shlibs/blkid/samples/mkfs.c b/shlibs/blkid/samples/mkfs.c index 64f213a63..866ca6e36 100644 --- a/shlibs/blkid/samples/mkfs.c +++ b/shlibs/blkid/samples/mkfs.c @@ -38,14 +38,14 @@ int main(int argc, char *argv[]) fd = open(devname, O_RDONLY); if (fd < 0) - err(EXIT_FAILURE, "%s: open() failed", devname); + errx(EXIT_FAILURE, "%s: open() failed", devname); pr = blkid_new_probe(); if (!pr) - err(EXIT_FAILURE, "faild to allocate a new libblkid probe"); + errx(EXIT_FAILURE, "faild to allocate a new libblkid probe"); if (blkid_probe_set_device(pr, fd, 0, 0) != 0) - err(EXIT_FAILURE, "failed to assign device to libblkid probe"); + errx(EXIT_FAILURE, "failed to assign device to libblkid probe"); /* * check Filesystems / Partitions overwrite @@ -74,15 +74,16 @@ int main(int argc, char *argv[]) */ tp = blkid_probe_get_topology(pr); if (!tp) - err(EXIT_FAILURE, "%s: failed to read topology", devname); + errx(EXIT_FAILURE, "%s: failed to read topology", devname); /* ... your mkfs.<type> code or so ... off = blkid_topology_get_alignment_offset(tp); - */ + blkid_free_probe(pr); + return EXIT_SUCCESS; } |