diff --git a/CHANGES b/CHANGES index 79ed285..f094b0f 100644 --- a/CHANGES +++ b/CHANGES @@ -4,6 +4,7 @@ i2c-tools CHANGES SVN decode-dimms: Fix DDR2 SDRAM module speed decoding Update manufacturer IDs. + decode-vaio: Private data might not be readable by non-root users i2cset: Final status messages go to stdout Return success even when readback fails or doesn't match i2c-stub-from-dump: New helper script to use with i2c-stub diff --git a/eeprom/decode-vaio.pl b/eeprom/decode-vaio.pl index fc89614..91b22a0 100755 --- a/eeprom/decode-vaio.pl +++ b/eeprom/decode-vaio.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl -w # -# Copyright (C) 2002-2006 Jean Delvare +# Copyright (C) 2002-2007 Jean Delvare # # 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 @@ -43,6 +43,8 @@ # Revision might be a Service Tag. # Version 1.4 2006-09-20 Jean Delvare # Detect and skip false positives (e.g. EDID EEPROMs). +# Version 1.5 2007-11-19 Jean Delvare +# UUID and serial number might be hidden # # EEPROM data decoding for Sony Vaio laptops. # @@ -81,6 +83,8 @@ use strict; use Fcntl qw(:DEFAULT :seek); use vars qw($sysfs $found); +use constant ONLYROOT => "Readable only by root"; + sub print_item { my ($label,$value) = @_; @@ -175,7 +179,14 @@ sub decode_uuid } } - return($string); + if ($string eq '00000000-0000-0000-0000-000000000000') + { + return(ONLYROOT); + } + else + { + return($string); + } } sub vaio_decode @@ -187,7 +198,8 @@ sub vaio_decode return 0 unless $name =~ m/^[A-Z-]{4}/; print_item('Machine Name', $name); - print_item('Serial Number', decode_string($bus, $addr, 192, 32)); + my $serial = decode_string($bus, $addr, 192, 32); + print_item('Serial Number', $serial ? $serial : ONLYROOT); print_item('UUID', decode_uuid($bus, $addr, 16)); my $revision = decode_string($bus, $addr, 160, 10); print_item(length($revision) > 2 ? 'Service Tag' : 'Revision', @@ -201,8 +213,8 @@ sub vaio_decode BEGIN { print("Sony Vaio EEPROM Decoder\n"); - print("Copyright (C) 2002-2006 Jean Delvare\n"); - print("Version 1.4\n\n"); + print("Copyright (C) 2002-2007 Jean Delvare\n"); + print("Version 1.5\n\n"); } END