ALT Linux Bugzilla
– Attachment 5772 Details for
Bug 28289
Восстановить функциональность live flash
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
cdrom.c: probe sdX1 before sdX if that's sdX not srY
0001-cdrom-primarily-try-mount-first-partition-of-hybrid-.patch (text/plain), 1.19 KB, created by
Michael Shigorin
on 2013-03-16 00:02:03 MSK
(
hide
)
Description:
cdrom.c: probe sdX1 before sdX if that's sdX not srY
Filename:
MIME Type:
Creator:
Michael Shigorin
Created:
2013-03-16 00:02:03 MSK
Size:
1.19 KB
patch
obsolete
>From 4d66f07d59362547af50099de618b85b1d493b7b Mon Sep 17 00:00:00 2001 >From: Led <led@altlinux.ru> >Date: Fri, 15 Mar 2013 20:13:28 +0200 >Subject: [PATCH] cdrom: primarily try mount first partition of hybrid image > >--- > cdrom.c | 19 +++++++++++++++---- > 1 file changed, 15 insertions(+), 4 deletions(-) > >diff --git a/cdrom.c b/cdrom.c >index d9afb81..02dc1d1 100644 >--- a/cdrom.c >+++ b/cdrom.c >@@ -26,6 +26,8 @@ > #include <string.h> > #include <stdio.h> > #include <sys/mount.h> >+#include <dirent.h> >+#include <ctype.h> > #include "stage1.h" > #include "frontend.h" > #include "modules.h" >@@ -39,10 +41,19 @@ extern char version[]; > > static int mount_that_cd_device(char * dev_name) > { >- char device_fullname[50]; >- >- strcpy(device_fullname, "/dev/"); >- strcat(device_fullname, dev_name); >+ char device_fullname[64] = "/dev/"; >+ size_t l = strlen(strcpy(device_fullname + 5, dev_name)); >+ >+ if (islower(device_fullname[l - 1])) { >+ int ret; >+ >+ device_fullname[l] = '1'; >+ device_fullname[l + 1] = '\0'; >+ ret = my_mount(device_fullname, IMAGE_LOCATION, "iso9660", 0); >+ if (ret != -1) >+ return ret; >+ device_fullname[l] = '\0'; >+ } > > return my_mount(device_fullname, IMAGE_LOCATION, "iso9660", 0); > } >-- >1.8.1.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 28289
: 5772