Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 173753 | Differences between
and this patch

Collapse All | Expand All

(-)qcheck-cvs.c (-4 / +4 lines)
Lines 43-49 Link Here
43
	char chk_hash = 1;
43
	char chk_hash = 1;
44
	char chk_mtime = 1;
44
	char chk_mtime = 1;
45
	struct stat st;
45
	struct stat st;
46
	size_t num_files, num_files_ok, num_files_unknown, num_files_ignored = 0;
46
	size_t num_files, num_files_ok, num_files_unknown, num_files_ignored;
47
	char buf[_Q_PATH_MAX], filename[_Q_PATH_MAX];
47
	char buf[_Q_PATH_MAX], filename[_Q_PATH_MAX];
48
	char buffer[_Q_PATH_MAX];
48
	char buffer[_Q_PATH_MAX];
49
49
Lines 118-124 Link Here
118
			if ((fp = fopen(buf, "r")) == NULL)
118
			if ((fp = fopen(buf, "r")) == NULL)
119
				continue;
119
				continue;
120
			strncat(buf, "~", sizeof(buf));
120
			strncat(buf, "~", sizeof(buf));
121
			num_files = num_files_ok = num_files_unknown = 0;
121
			num_files = num_files_ok = num_files_unknown = num_files_ignored = 0;
122
			printf("%sing %s%s/%s%s ...\n",
122
			printf("%sing %s%s/%s%s ...\n",
123
				(qc_update ? "Updat" : "Check"),
123
				(qc_update ? "Updat" : "Check"),
124
				GREEN, dentry->d_name, de->d_name, NORM);
124
				GREEN, dentry->d_name, de->d_name, NORM);
Lines 179-192 Link Here
179
					}
179
					}
180
					hashed_file = (char*)hash_file(e->name, hash_algo);
180
					hashed_file = (char*)hash_file(e->name, hash_algo);
181
					if (!hashed_file) {
181
					if (!hashed_file) {
182
						++num_files_unknown;
183
						free(hashed_file);
182
						if (qc_update) {
184
						if (qc_update) {
183
							fputs(buffer, fpx);
185
							fputs(buffer, fpx);
184
							if (!verbose)
186
							if (!verbose)
185
								continue;
187
								continue;
186
						}
188
						}
187
						printf(" %sPERM %4o%s: %s\n", RED, (st.st_mode & 07777), NORM, e->name);
189
						printf(" %sPERM %4o%s: %s\n", RED, (st.st_mode & 07777), NORM, e->name);
188
						++num_files_unknown;
189
						free(hashed_file);
190
						continue;
190
						continue;
191
					} else if (strcmp(e->digest, hashed_file)) {
191
					} else if (strcmp(e->digest, hashed_file)) {
192
						if (chk_hash) {
192
						if (chk_hash) {

Return to bug 173753