diff options
author | Kay Sievers <kay.sievers@suse.de> | 2005-08-01 01:33:36 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@suse.de> | 2005-08-01 01:33:36 +0200 |
commit | 70721db6d7ba0d4f3ac5c17f2cedac056065ad8a (patch) | |
tree | f029523e975639453dcd027ee43a7bc742d0845c /extras/ata_id | |
parent | 62a22c8d75550d5720019468c7a881a573bff22b (diff) |
fix GGC signed pointer warnings and switch volume_id to stdint
Solaris uses volume_id now and they fiddled around with configure scripts
to map the linux kernel int types. Adding the types locally to volume_id
breaks the klibc build, so just switch to these ugly types and forget it. :)
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Diffstat (limited to 'extras/ata_id')
-rw-r--r-- | extras/ata_id/Makefile | 2 | ||||
-rw-r--r-- | extras/ata_id/ata_id.c | 11 |
2 files changed, 5 insertions, 8 deletions
diff --git a/extras/ata_id/Makefile b/extras/ata_id/Makefile index a19c4b2289..fb45bcca64 100644 --- a/extras/ata_id/Makefile +++ b/extras/ata_id/Makefile @@ -28,8 +28,6 @@ INSTALL_PROGRAM = ${INSTALL} INSTALL_DATA = ${INSTALL} -m 644 INSTALL_SCRIPT = ${INSTALL_PROGRAM} -override CFLAGS+=-D_FILE_OFFSET_BITS=64 - OBJS = ata_id.o ../../udev.a $(OBJS): $(HEADERS) diff --git a/extras/ata_id/ata_id.c b/extras/ata_id/ata_id.c index 1e99b9df9c..2840e91457 100644 --- a/extras/ata_id/ata_id.c +++ b/extras/ata_id/ata_id.c @@ -62,10 +62,9 @@ void log_message(int priority, const char *format, ...) } #endif -static void set_str(char *to, const unsigned char *from, int count) +static void set_str(char *to, const char *from, size_t count) { - int i, j; - int len; + size_t i, j, len; /* strip trailing whitespace */ len = strnlen(from, count); @@ -139,9 +138,9 @@ int main(int argc, char *argv[]) goto close; } - set_str(model, id.model, 40); - set_str(serial, id.serial_no, 20); - set_str(revision, id.fw_rev, 8); + set_str(model, (char *) id.model, 40); + set_str(serial, (char *) id.serial_no, 20); + set_str(revision, (char *) id.fw_rev, 8); if (export) { if ((id.config >> 8) & 0x80) { |