diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2012-04-04 13:29:37 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2012-04-04 13:29:37 +0200 |
commit | 51fc11c10d7f7f24cf795d751a99d37aadf4da72 (patch) | |
tree | 3e4b4ebb110b8cea2eaa61b83d70e52df95726c1 /src/udev | |
parent | 0c9507fe2469c2da2ffbc9c8a698cc888cef40fc (diff) |
udev: ata_id - remove assert() until we switch over to systemd logging
Diffstat (limited to 'src/udev')
-rw-r--r-- | src/udev/ata_id/ata_id.c | 43 |
1 files changed, 18 insertions, 25 deletions
diff --git a/src/udev/ata_id/ata_id.c b/src/udev/ata_id/ata_id.c index 846a73b547..d2fe917217 100644 --- a/src/udev/ata_id/ata_id.c +++ b/src/udev/ata_id/ata_id.c @@ -25,7 +25,6 @@ #include <unistd.h> #include <fcntl.h> #include <ctype.h> -#include <assert.h> #include <string.h> #include <errno.h> #include <getopt.h> @@ -302,10 +301,6 @@ static void disk_identify_get_string(uint8_t identify[512], unsigned int c1; unsigned int c2; - assert(identify != NULL); - assert(dest != NULL); - assert((dest_len & 1) == 0); - while (dest_len > 0) { c1 = identify[offset_words * 2 + 1]; c2 = identify[offset_words * 2]; @@ -363,8 +358,6 @@ static int disk_identify(struct udev *udev, int n; int is_packet_device; - assert(out_identify != NULL); - /* init results */ ret = -1; memset(out_identify, '\0', 512); @@ -510,24 +503,24 @@ int main(int argc, char *argv[]) * fix up only the fields from the IDENTIFY data that we are going to * use and copy it into the hd_driveid struct for convenience */ - disk_identify_fixup_string (identify, 10, 20); /* serial */ - disk_identify_fixup_string (identify, 23, 6); /* fwrev */ - disk_identify_fixup_string (identify, 27, 40); /* model */ - disk_identify_fixup_uint16 (identify, 0); /* configuration */ - disk_identify_fixup_uint16 (identify, 75); /* queue depth */ - disk_identify_fixup_uint16 (identify, 75); /* SATA capabilities */ - disk_identify_fixup_uint16 (identify, 82); /* command set supported */ - disk_identify_fixup_uint16 (identify, 83); /* command set supported */ - disk_identify_fixup_uint16 (identify, 84); /* command set supported */ - disk_identify_fixup_uint16 (identify, 85); /* command set supported */ - disk_identify_fixup_uint16 (identify, 86); /* command set supported */ - disk_identify_fixup_uint16 (identify, 87); /* command set supported */ - disk_identify_fixup_uint16 (identify, 89); /* time required for SECURITY ERASE UNIT */ - disk_identify_fixup_uint16 (identify, 90); /* time required for enhanced SECURITY ERASE UNIT */ - disk_identify_fixup_uint16 (identify, 91); /* current APM values */ - disk_identify_fixup_uint16 (identify, 94); /* current AAM value */ - disk_identify_fixup_uint16 (identify, 128); /* device lock function */ - disk_identify_fixup_uint16 (identify, 217); /* nominal media rotation rate */ + disk_identify_fixup_string(identify, 10, 20); /* serial */ + disk_identify_fixup_string(identify, 23, 6); /* fwrev */ + disk_identify_fixup_string(identify, 27, 40); /* model */ + disk_identify_fixup_uint16(identify, 0); /* configuration */ + disk_identify_fixup_uint16(identify, 75); /* queue depth */ + disk_identify_fixup_uint16(identify, 75); /* SATA capabilities */ + disk_identify_fixup_uint16(identify, 82); /* command set supported */ + disk_identify_fixup_uint16(identify, 83); /* command set supported */ + disk_identify_fixup_uint16(identify, 84); /* command set supported */ + disk_identify_fixup_uint16(identify, 85); /* command set supported */ + disk_identify_fixup_uint16(identify, 86); /* command set supported */ + disk_identify_fixup_uint16(identify, 87); /* command set supported */ + disk_identify_fixup_uint16(identify, 89); /* time required for SECURITY ERASE UNIT */ + disk_identify_fixup_uint16(identify, 90); /* time required for enhanced SECURITY ERASE UNIT */ + disk_identify_fixup_uint16(identify, 91); /* current APM values */ + disk_identify_fixup_uint16(identify, 94); /* current AAM value */ + disk_identify_fixup_uint16(identify, 128); /* device lock function */ + disk_identify_fixup_uint16(identify, 217); /* nominal media rotation rate */ memcpy(&id, identify, sizeof id); } else { /* If this fails, then try HDIO_GET_IDENTITY */ |