Date: Fri, 12 Jun 1998 23:31:30 +0900 From: kogane@kces.koganemaru.co.jp To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: misc/6936: sysinstall: install from MS-DOS MO divece Message-ID: <199806121431.XAA03037@kces.koganemaru.co.jp>
index | next in thread | raw e-mail
>Number: 6936
>Category: misc
>Synopsis: sysinstall: install from MS-DOS MO divece
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sat Jun 13 02:30:01 PDT 1998
>Last-Modified:
>Originator: Nobuyuki Koganemaru
>Organization:
KOGANEMARU Computer Engineering Service Corporation.
>Release: FreeBSD 2.2.6-RELEASE i386
>Environment:
FreeBSD 2.2.6-RELEASE
>Description:
This is pach for sysinstall. it can be installing form MS-DOS
MO device.
>How-To-Repeat:
.
>Fix:
*** lib/libdisk/disk.c.orig Mon Mar 23 12:28:04 1998
--- lib/libdisk/disk.c Fri Jun 12 23:00:38 1998
***************
*** 53,58 ****
--- 53,59 ----
struct disk *d;
struct dos_partition *dp;
void *p;
+ unsigned char *s;
u_long offset = 0;
strcpy(device,"/dev/r");
***************
*** 89,96 ****
--- 90,103 ----
printf("\n");
#endif
+ /* XXX --- ds.dss_slice[WHOLE_DISK_SLCIE].ds.size of MO disk is wrong!!! */
+ #if 1 /* MO */
+ if (!size)
+ size = dl.d_ncylinders * dl.d_ntracks * dl.d_nsectors;
+ #else
if (!size)
size = ds.dss_slices[WHOLE_DISK_SLICE].ds_size;
+ #endif
p = read_block(fd,0);
dp = (struct dos_partition*)(p+DOSPARTOFF);
***************
*** 123,128 ****
--- 130,147 ----
{}
#endif
+ #if 1 /* MO */
+ /* XXX -- Quick Hack! Check MS-DOS MO */
+ s = (unsigned char*)read_block(fd,1);
+ if ((*s == 0xf0 || *s == 0xf8) &&
+ (*(s+1) == 0xff) &&
+ (*(s+2) == 0xff)) {
+ free(s);
+ Add_Chunk(d, 0, size, name, fat, 0, 0);
+ goto mo_done;
+ }
+ free(s);
+ #endif /* MO */
for(i=BASE_SLICE;i<ds.dss_nslices;i++) {
char sname[20];
chunk_e ce;
***************
*** 221,226 ****
--- 240,246 ----
}
}
}
+ mo_done:
close(fd);
Fixup_Names(d);
Bios_Limit_Chunk(d->chunks,1024*d->bios_hd*d->bios_sect);
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806121431.XAA03037>
