Bug#123973: allowing "mount -t auto" as fallback
#include Adam Di Carlo wrote on Tue Dec 18, 2001 um 01:52:26AM: > > Hm. Microsoft was very clever and invented different partition types for > > FAT. Our autodetection routines may fail sometimes. I think we could > > make a workaround relying on the autodetection of the filesystem. Has > > anyone a better idea? I think this should work: > > I don't understand what your patch is doing. Okay, before this patch, we got the fixed filesytem type from libfdisk. But libfdisk did allways return "msdos" - and the ancient msdos driver does not support fat32 variant at all. > Why would we want the -r switch and p->name twice? Just copy&pasted to feed sprintf with the same arguments. But forget it, I made another workaround to replace msdos with vfat if supported. This is untested, but should work. I will test later. Index: choose_medium.c === RCS file: /cvs/debian-boot/boot-floppies/utilities/dbootstrap/choose_medium.c,v retrieving revision 1.118 diff -u -r1.118 choose_medium.c --- choose_medium.c 2001/11/03 15:28:01 1.118 +++ choose_medium.c 2001/12/18 08:50:33 @@ -929,6 +929,11 @@ fdisk_sysname(p->type)); return 1; } + +/* if libfdisk reported msdos but we have vfat support, use vfat */ +if(strcmp(type,"msdos")==0 && !is_filesystem_supported("vfat")) + type="vfat"; + #ifndef _TESTING_ snprintf(prtbuf, sizeof(prtbuf), "mount -t %s %s %s " CM_MOUNTPOINT_DIR, Gruss/Regards, Eduard. -- Everything should be made as simple as possible, but not simpler. -- Albert Einstein msg13959/pgp0.pgp Description: PGP signature
allowing "mount -t auto" as fallback
#include Tom Wzietek wrote on Fri Dec 14, 2001 um 07:34:23AM: > loadlin.exe, linux, root.bin, rescue.bin and drivers.tgz onto a FAT32 > partition which will co-exist with my woody installation. I chose this Hm. Microsoft was very clever and invented different partition types for FAT. Our autodetection routines may fail sometimes. I think we could make a workaround relying on the autodetection of the filesystem. Has anyone a better idea? I think this should work: --- choose_medium.c 2001/11/03 15:28:01 1.118 +++ choose_medium.c 2001/12/14 13:29:58 @@ -931,8 +931,8 @@ } #ifndef _TESTING_ snprintf(prtbuf, sizeof(prtbuf), -"mount -t %s %s %s " CM_MOUNTPOINT_DIR, -type, (disqtype == problem_report ? "" : "-r"), p->name); +"mount -t %s %s %s || mount %s %s" CM_MOUNTPOINT_DIR, +type, (disqtype == problem_report ? "" : "-r"), p->name, (disqtype == +problem_report ? "" : "-r"), p->name); if (execlog(prtbuf, LOG_INFO)) { problemBox(_("The partition was not mounted successfully."), _("Mount Failed")); Gruss/Regards, Eduard. -- "Only wimps use tape backups: real men upload their important stuff on ftp, and let the rest of the world mirror it." - Linus B. Torvalds -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]