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

(-)a/cdrom.c (-5 / +15 lines)
Lines 26-31 Link Here
26
#include <string.h>
26
#include <string.h>
27
#include <stdio.h>
27
#include <stdio.h>
28
#include <sys/mount.h>
28
#include <sys/mount.h>
29
#include <dirent.h>
30
#include <ctype.h>
29
#include "stage1.h"
31
#include "stage1.h"
30
#include "frontend.h"
32
#include "frontend.h"
31
#include "modules.h"
33
#include "modules.h"
Lines 39-48 extern char version[]; Link Here
39
41
40
static int mount_that_cd_device(char * dev_name)
42
static int mount_that_cd_device(char * dev_name)
41
{
43
{
42
	char device_fullname[50];
44
	char device_fullname[64] = "/dev/";
43
45
	size_t l = strlen(strcpy(device_fullname + 5, dev_name));
44
	strcpy(device_fullname, "/dev/");
46
45
	strcat(device_fullname, dev_name);
47
	if (islower(device_fullname[l - 1])) {
48
		int ret;
49
50
		device_fullname[l] = '1';
51
		device_fullname[l + 1] = '\0';
52
		ret = my_mount(device_fullname, IMAGE_LOCATION, "iso9660", 0);
53
		if (ret != -1)
54
			return ret;
55
		device_fullname[l] = '\0';
56
	}
46
57
47
	return my_mount(device_fullname, IMAGE_LOCATION, "iso9660", 0);
58
	return my_mount(device_fullname, IMAGE_LOCATION, "iso9660", 0);
48
}
59
}
49
- 

Return to bug 28289