View | Details | Raw Unified | Return to bug 30315
Collapse All | Expand All

(-)a/cdrom.c (+2 lines)
Lines 27-32 Link Here
27
#include <stdio.h>
27
#include <stdio.h>
28
#include <sys/mount.h>
28
#include <sys/mount.h>
29
#include <ctype.h>
29
#include <ctype.h>
30
#include <dirent.h>
31
30
#include "stage1.h"
32
#include "stage1.h"
31
#include "frontend.h"
33
#include "frontend.h"
32
#include "modules.h"
34
#include "modules.h"
(-)a/probing.c (-6 / +10 lines)
Lines 149-155 static void find_media(void) Link Here
149
	while ((dirent = readdir(dir)) != NULL) {
149
	while ((dirent = readdir(dir)) != NULL) {
150
		if (!strcmp(dirent->d_name, ".") ||
150
		if (!strcmp(dirent->d_name, ".") ||
151
			!strcmp(dirent->d_name, "..")) continue;
151
			!strcmp(dirent->d_name, "..")) continue;
152
		
152
153
		memset(path, 0, SYSFS_PATH_MAX);
153
		memset(path, 0, SYSFS_PATH_MAX);
154
		strcpy(path, "/sys/block/");
154
		strcpy(path, "/sys/block/");
155
		strcat(path, dirent->d_name);
155
		strcat(path, dirent->d_name);
Lines 161-171 static void find_media(void) Link Here
161
			tmp[count].name = strdup(dirent->d_name);
161
			tmp[count].name = strdup(dirent->d_name);
162
			tmp[count].type = UNKNOWN_MEDIA;
162
			tmp[count].type = UNKNOWN_MEDIA;
163
			if ((f = fopen(path, "r")) != NULL) {
163
			if ((f = fopen(path, "r")) != NULL) {
164
				int type;
164
				int type = SCSI_TYPE_DISK;
165
				if (fgets(buf, sizeof(buf), f) && sscanf(buf, "%d", &type)) {
165
				if (fgets(buf, sizeof(buf), f) > 0) {
166
					if (type == SCSI_TYPE_DISK) tmp[count].type = DISK;
166
					if (strncmp(buf, "MMC", 3) == 0)
167
					else if (type == SCSI_TYPE_ROM) tmp[count].type = CDROM;
167
					    tmp[count].type = DISK;
168
					else if (type == SCSI_TYPE_TAPE) tmp[count].type = TAPE;
168
					else if (sscanf(buf, "%d", &type) > 0) {
169
						if (type == SCSI_TYPE_DISK) tmp[count].type = DISK;
170
						else if (type == SCSI_TYPE_ROM) tmp[count].type = CDROM;
171
						else if (type == SCSI_TYPE_TAPE) tmp[count].type = TAPE;
172
					}
169
				}
173
				}
170
				fclose(f);
174
				fclose(f);
171
			}
175
			}
(-)a/propagator.spec (-1 / +5 lines)
Lines 2-8 Link Here
2
%def_with splash
2
%def_with splash
3
3
4
Name: propagator
4
Name: propagator
5
Version: 20170511
5
Version: 20171020
6
Release: alt1
6
Release: alt1
7
7
8
Summary: 'Early userspace' set of binaries
8
Summary: 'Early userspace' set of binaries
Lines 37-42 including init and various helpers for hw probing and bootstrapping. Link Here
37
%_sbindir/propagator
37
%_sbindir/propagator
38
38
39
%changelog
39
%changelog
40
* Fri Oct 20 2017 Leonid Krivoshein <klark@altlinux.org> 20171020-alt1
41
- cdrom.c: fixed implicit declaration of function 'opendir' warning.
42
- probing.c: added support for MMC devices when boot in LiveCD-mode.
43
40
* Thu May 11 2017 Gleb F-Malinovskiy <glebfm@altlinux.org> 20170511-alt1
44
* Thu May 11 2017 Gleb F-Malinovskiy <glebfm@altlinux.org> 20170511-alt1
41
- Fixed errors found by cppcheck.
45
- Fixed errors found by cppcheck.
42
46

Return to bug 30315