/*
- * create_floppy_devices
- *
* Create all possible floppy device based on the CMOS type.
* Based upon code from drivers/block/floppy.c
*
* Copyright(C) 2005, SUSE Linux Products GmbH
*
- * Author:
- * Hannes Reinecke <hare@suse.de>
+ * Author: Hannes Reinecke <hare@suse.de>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation version 2 of the License.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
#include <pwd.h>
#include <grp.h>
-#include "../../udev/udev.h"
+#include "libudev.h"
+#include "libudev-private.h"
static char *table[] = {
"", "d360", "h1200", "u360", "u720", "h360", "h720",
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);
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;
}
udev_selinux_exit(udev);
udev_unref(udev);
+ udev_log_close();
exit:
return 0;
}