# HG changeset patch # User Pascal Bellard # Date 1333200743 -7200 # Node ID 7219c33850c698077732b12ce6bb398ac0fcb467 # Parent d423bfd548e38979e4674e1a551c29d984843890 syslinux/md5sum.c32: show unchecked files diff -r d423bfd548e3 -r 7219c33850c6 syslinux/stuff/extra/md5sum.c --- a/syslinux/stuff/extra/md5sum.c Sat Mar 31 14:27:35 2012 +0200 +++ b/syslinux/stuff/extra/md5sum.c Sat Mar 31 15:32:23 2012 +0200 @@ -299,16 +299,6 @@ return hash_value; } -static int valid_name(char *name) -{ - int dots, suffix; - for (dots = 0, suffix = 0; *name; name++) { - if (dots) suffix++; - if (*name == '.') dots++; - } - return dots < 2 && suffix <= 3; -} - int main(int argc, char **argv) { int return_value = EXIT_SUCCESS; @@ -344,11 +334,11 @@ *filename_ptr = '\0'; *++filename_ptr = '/'; - status = "SKIPPED" BLANK; - if (valid_name(filename_ptr)) { - hash_value = hash_file(filename_ptr); + status = "NOT CHECKED" BLANK "\n"; + hash_value = hash_file(filename_ptr); + if (hash_value) { status = "OK" BLANK; - if (hash_value == NULL || strcmp((char*)hash_value, line)) { + if (strcmp((char*)hash_value, line)) { return_value = EXIT_FAILURE; status = "FAILED" BLANK "\n"; }