From: Matthias Schwarzott Date: Sat, 28 Apr 2007 22:08:30 +0000 (+0200) Subject: ata_id: don't log error for libata devices on older kernels X-Git-Tag: 174~1980 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cfdea0f647720222bb2fde67ab0a083167e9b2b4;p=systemd ata_id: don't log error for libata devices on older kernels --- diff --git a/extras/ata_id/ata_id.c b/extras/ata_id/ata_id.c index aedebff7..ddd41512 100644 --- a/extras/ata_id/ata_id.c +++ b/extras/ata_id/ata_id.c @@ -120,8 +120,13 @@ int main(int argc, char *argv[]) } if (ioctl(fd, HDIO_GET_IDENTITY, &id)) { - err("HDIO_GET_IDENTITY failed for '%s'", node); - rc = 3; + if (errno == ENOTTY) { + info("HDIO_GET_IDENTITY unsupported for '%s'", node); + rc = 2; + } else { + err("HDIO_GET_IDENTITY failed for '%s'", node); + rc = 3; + } goto close; }