X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=extras%2Fdasd_id%2Fdasd_id.c;h=b2496e99f811f79860ed919961a47acc9612956a;hb=1aa1e24848903d11780db1ade355be73ad61a937;hp=5c2143f45d5c3a98c44822051e48aca6137e01a3;hpb=15e5209b8e93eacfcc3440d383d5b05b5e054934;p=elogind.git diff --git a/extras/dasd_id/dasd_id.c b/extras/dasd_id/dasd_id.c index 5c2143f45..b2496e99f 100644 --- a/extras/dasd_id/dasd_id.c +++ b/extras/dasd_id/dasd_id.c @@ -6,16 +6,6 @@ * 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. - * - * 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. - * - * 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., - * 675 Mass Ave, Cambridge, MA 02139, USA. - * */ #ifndef _GNU_SOURCE @@ -33,10 +23,8 @@ #include #include #include -#include -#include "../../logging.h" -#include "../../udev_utils.h" +#include "../../udev.h" #ifdef USE_LOG void log_message(int priority, const char *format, ...) @@ -140,7 +128,7 @@ static unsigned char EBCtoASC[256] = 0x38, 0x39, 0x07, 0x07, 0x9A, 0x07, 0x07, 0x07 }; -static void vtoc_ebcdic_dec (const unsigned char *source, char *target, int l) +static void vtoc_ebcdic_dec (const unsigned char *source, unsigned char *target, int l) { int i; @@ -183,8 +171,8 @@ static int dasd_id(int fd) { int blocksize; dasd_information_t info; - __u8 *data; - __u8 *label_raw; + unsigned char *data; + unsigned char *label_raw; if (ioctl(fd, BIODASDINFO, &info) != 0) { dbg("not a dasd"); @@ -262,6 +250,7 @@ int main(int argc, char *argv[]) if (export) { printf("ID_TYPE=disk\n"); printf("ID_SERIAL=%s\n",serial); + printf("ID_BUS=ccw\n"); } else printf("%s\n", serial);