From 22d9acbbb27d600b11db2ef94bf9d871d8344e38 Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Sun, 8 Oct 2006 19:38:10 +0000 Subject: [PATCH] Added missing device.h --- src/device.c | 13 +++++++------ src/device.h | 23 +++++++++++++++++++++++ src/test.c | 1 + 3 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 src/device.h diff --git a/src/device.c b/src/device.c index b0702b6..85f67ee 100644 --- a/src/device.c +++ b/src/device.c @@ -22,14 +22,15 @@ #include "hal.h" #include "log.h" #include "otp.h" +#include "device.h" -LibHalDrive *pusb_device_get_storage(t_pusb_options *opts, LibHalContext *ctx, - const char *udi) +static LibHalDrive *pusb_device_get_storage(t_pusb_options *opts, LibHalContext *ctx, + const char *udi) { - char *phy_udi = NULL; - char *storage_udi = NULL; - int maxloop = 0; - LibHalDrive *drive = NULL; + char *phy_udi = NULL; + char *storage_udi = NULL; + int maxloop = 0; + LibHalDrive *drive = NULL; log_debug("Waiting for device to come up...\n"); while (!(phy_udi = pusb_hal_find_item(ctx, diff --git a/src/device.h b/src/device.h new file mode 100644 index 0000000..05b07dc --- /dev/null +++ b/src/device.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2003-2006 Andrea Luzzardi + * + * This file is part of the pam_usb project. pam_usb is free software; + * you can redistribute it and/or modify it under the terms of the GNU General + * Public License version 2, as published by the Free Software Foundation. + * + * pam_usb 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. + * + * You should have received a copy of the GNU General Public License along with + * this program; if not, write to the Free Software Foundation, Inc., 59 Temple + * Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef PUSB_DEVICE_H_ +# define PUSB_DEVICE_H_ + +int pusb_device_check(t_pusb_options *opts); + +#endif /* !PUSB_DEVICE_H_ */ diff --git a/src/test.c b/src/test.c index 426fe13..eb6094b 100644 --- a/src/test.c +++ b/src/test.c @@ -18,6 +18,7 @@ #include #include "conf.h" #include "log.h" +#include "device.h" static void pusb_dump_conf(t_pusb_options *opts) {