]>
Commit | Line | Data |
---|---|---|
1 | /* IPCop install program. | |
2 | * | |
3 | * This program is distributed under the terms of the GNU General Public | |
4 | * Licence. See the file COPYING for details. | |
5 | * | |
6 | * (c) Alan Hourihane, 2003 <alanh@fairlite.demon.co.uk> | |
7 | * | |
8 | * $Id: scsi.c | |
9 | * | |
10 | */ | |
11 | ||
12 | #include "install.h" | |
13 | ||
14 | int | |
15 | try_scsi(char *disk_device) | |
16 | { | |
17 | int fd; | |
18 | char dev[10]; | |
19 | ||
20 | sprintf(dev, "/dev/%s", disk_device); | |
21 | ||
22 | if ((fd = open(dev, O_RDONLY)) < 0) | |
23 | return 0; | |
24 | ||
25 | close(fd); | |
26 | ||
27 | return 1; | |
28 | } |