From c40c0b624cdca8eb912b27f66fd6d86044028fa9 Mon Sep 17 00:00:00 2001 From: ewt Date: Tue, 20 Feb 1996 22:18:36 +0000 Subject: [PATCH] missing files are reported better CVS patchset: 369 CVS date: 1996/02/20 22:18:36 --- verify.c | 54 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/verify.c b/verify.c index b37e4a6..e91618a 100644 --- a/verify.c +++ b/verify.c @@ -23,33 +23,35 @@ static void verifyHeader(char * prefix, Header h) { if (getEntry(h, RPMTAG_FILENAMES, &type, (void **) &fileList, &count)) { for (i = 0; i < count; i++) { - rpmVerifyFile(prefix, h, i, &verifyResult); + if (rpmVerifyFile(prefix, h, i, &verifyResult)) + printf("missing %s\n", fileList[i]); + else { + size = md5 = link = mtime = mode = "."; + user = group = rdev = "."; - size = md5 = link = mtime = mode = "."; - user = group = rdev = "."; - - if (!verifyResult) continue; - - if (verifyResult & VERIFY_MD5) - md5 = "5"; - if (verifyResult & VERIFY_FILESIZE) - size = "S"; - if (verifyResult & VERIFY_LINKTO) - link = "L"; - if (verifyResult & VERIFY_MTIME) - mtime = "T"; - if (verifyResult & VERIFY_RDEV) - rdev = "D"; - if (verifyResult & VERIFY_USER) - user = "U"; - if (verifyResult & VERIFY_GROUP) - group = "G"; - if (verifyResult & VERIFY_MODE) - mode = "M"; - - printf("%s%s%s%s%s%s%s%s %s\n", - size, mode, md5, rdev, link, user, group, mtime, - fileList[i]); + if (!verifyResult) continue; + + if (verifyResult & VERIFY_MD5) + md5 = "5"; + if (verifyResult & VERIFY_FILESIZE) + size = "S"; + if (verifyResult & VERIFY_LINKTO) + link = "L"; + if (verifyResult & VERIFY_MTIME) + mtime = "T"; + if (verifyResult & VERIFY_RDEV) + rdev = "D"; + if (verifyResult & VERIFY_USER) + user = "U"; + if (verifyResult & VERIFY_GROUP) + group = "G"; + if (verifyResult & VERIFY_MODE) + mode = "M"; + + printf("%s%s%s%s%s%s%s%s %s\n", + size, mode, md5, rdev, link, user, group, mtime, + fileList[i]); + } } free(fileList); -- 2.7.4