diff --git a/pam_usb/src/device.c b/pam_usb/src/device.c index b0702b6..85f67ee 100644 --- a/pam_usb/src/device.c +++ b/pam_usb/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/pam_usb/src/device.h b/pam_usb/src/device.h new file mode 100644 index 0000000..05b07dc --- /dev/null +++ b/pam_usb/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/pam_usb/src/test.c b/pam_usb/src/test.c index 426fe13..eb6094b 100644 --- a/pam_usb/src/test.c +++ b/pam_usb/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) {