From kogane@koganemaru.co.jp  Sat Jun 13 02:29:56 1998
Received: from mail0.iij.ad.jp (mail0.iij.ad.jp [202.232.2.113])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA21716
          for <FreeBSD-gnats-submit@freebsd.org>; Sat, 13 Jun 1998 02:29:54 -0700 (PDT)
          (envelope-from kogane@koganemaru.co.jp)
Received: from uucp2.iij.ad.jp (uucp2.iij.ad.jp [202.232.2.202])
	by mail0.iij.ad.jp (8.8.8/3.6W-MAIL) with SMTP id SAA16861
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 13 Jun 1998 18:29:44 +0900 (JST)
Received: (from uucp@localhost) by uucp2.iij.ad.jp (8.6.12+2.4W/3.3W9-UUCP) with UUCP id SAA02267 for FreeBSD-gnats-submit@freebsd.org; Sat, 13 Jun 1998 18:29:44 +0900
Received: (from kogane@localhost) by kces.koganemaru.co.jp (8.6.12/3.3W9-) id XAA03037; Fri, 12 Jun 1998 23:31:30 +0900
Message-Id: <199806121431.XAA03037@kces.koganemaru.co.jp>
Date: Fri, 12 Jun 1998 23:31:30 +0900
From: kogane@kces.koganemaru.co.jp
Reply-To: kogane@kces.koganemaru.co.jp
To: FreeBSD-gnats-submit@freebsd.org
Subject: sysinstall: install from MS-DOS MO divece
X-Send-Pr-Version: 3.2

>Number:         6936
>Category:       misc
>Synopsis:       sysinstall: install from MS-DOS MO divece
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    phk
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 13 02:30:01 PDT 1998
>Closed-Date:    Fri Nov 16 15:00:11 PST 2001
>Last-Modified:  Fri Nov 16 15:00:22 PST 2001
>Originator:     Nobuyuki Koganemaru
>Release:        FreeBSD 2.2.6-RELEASE i386
>Organization:
KOGANEMARU Computer Engineering Service Corporation.
>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);
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->phk 
Responsible-Changed-By: phantom 
Responsible-Changed-When: Tue Dec 21 09:48:03 PST 1999 
Responsible-Changed-Why:  
libdisk is phk's baby 
State-Changed-From-To: open->closed 
State-Changed-By: phk 
State-Changed-When: Fri Nov 16 15:00:11 PST 2001 
State-Changed-Why:  
timed out. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=6936 
>Unformatted:
