X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=extras%2Ffloppy%2Fcreate_floppy_devices.c;h=2fc05cc4943387d66c2a3014deaeea1b90d2acf0;hp=14df052cf7b7e4964edc220fb9863ca5735b99cc;hb=11a421dab5ab4bf9b40464a64b81c9d5c282f414;hpb=013332b93c880692e51d1056528c805fd7e4a882 diff --git a/extras/floppy/create_floppy_devices.c b/extras/floppy/create_floppy_devices.c index 14df052cf..2fc05cc49 100644 --- a/extras/floppy/create_floppy_devices.c +++ b/extras/floppy/create_floppy_devices.c @@ -24,7 +24,8 @@ #include #include -#include "../../udev/udev.h" +#include "libudev.h" +#include "libudev-private.h" static char *table[] = { "", "d360", "h1200", "u360", "u720", "h360", "h720", @@ -66,7 +67,7 @@ int main(int argc, char **argv) if (udev == NULL) goto exit; - logging_init("create_floppy_devices"); + udev_log_init("create_floppy_devices"); udev_set_log_fn(udev, log_fn); udev_selinux_init(udev); @@ -137,7 +138,7 @@ int main(int argc, char **argv) return 1; } - if (type < 0 || type >= (int) (sizeof(table_sup) / sizeof(table_sup[0]))) { + if (type < 0 || type >= (int) ARRAY_SIZE(table_sup)) { fprintf(stderr,"Invalid CMOS type %d\n", type); return 1; } @@ -164,6 +165,7 @@ int main(int argc, char **argv) udev_selinux_exit(udev); udev_unref(udev); + udev_log_close(); exit: return 0; }