From tfuruya@ppp142197.asahi-net.or.jp  Wed Jan 19 11:54:47 2000
Return-Path: <tfuruya@ppp142197.asahi-net.or.jp>
Received: from ppp142197.asahi-net.or.jp (ppp142197.asahi-net.or.jp [202.213.142.197])
	by hub.freebsd.org (Postfix) with ESMTP id 8E01615052
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 19 Jan 2000 11:54:40 -0800 (PST)
	(envelope-from tfuruya@ppp142197.asahi-net.or.jp)
Received: (from tfuruya@localhost)
	by galois.tf.or.jp (8.9.3/3.7W-Teddy-99050304) id EAA20861;
	Thu, 20 Jan 2000 04:49:07 +0900 (JST)
Message-Id: <200001191949.EAA20861@galois.tf.or.jp>
Date: Thu, 20 Jan 2000 04:49:07 +0900 (JST)
From: Tetsuro Furuya <tfuruya@ppp142197.asahi-net.or.jp>
Reply-To: tfuruya@ppp142197.asahi-net.or.jp
To: FreeBSD-gnats-submit@freebsd.org
Subject: Bugs of opie.4
X-Send-Pr-Version: 3.2

>Number:         16209
>Category:       docs
>Synopsis:       Bugs of opie.4
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 19 12:00:00 PST 2000
>Closed-Date:    Wed Jan 19 14:08:31 PST 2000
>Last-Modified:  Mon Apr  9 14:10:10 UTC 2012
>Originator:     Tetsuro Furuya
>Release:        FreeBSD 2.2.7-RELEASE i386 and later
>Organization:
man-jp-reviewer@jp.freebsd.org
>Environment:

man 4 opie,
compilation of c source including opie authentication.

>Description:

unseen statements,
error directives on c source.

>How-To-Repeat:

man 4 opie

>Fix:
Here is diff file to fix.

--- opie.4.orig	Sat May  1 15:43:08 1999
+++ opie.4	Sat May  1 15:44:14 1999
@@ -211,17 +211,17 @@
 .IR opiekey(1),
 which is an OPIE key calculator.
 
-.LP ADDING OPIE TO OTHER PROGRAMS
+.SH ADDING OPIE TO OTHER PROGRAMS
 
 Adding OPIE authentication to programs other than the ones included as clients
 in the OPIE distribution isn't very difficult. First, you will need to make
 sure that the program includes <stdio.h> somewhere. Then, below the other
 includes such as <stdio.h>, but before variable declarations, you need to
-include "opie.h". You need to add a variable of type "struct opie" to your
+include <opie.h>. You need to add a variable of type "struct opie" to your
 program, you need to make sure that the buffer that you use to get a password
 from the user is big enough to hold OPIE_RESPONSE_MAX+1 characters, and you
 need to have a buffer in which to store the challenge string that is big enough
-to hold OPIE_PROMPT_MAX+1 characters.
+to hold OPIE_CHALLENGE_MAX+1 characters.
 .LP
 When you are ready to output the challenge string and know the user's name,
 you would use a call to opiechallenge. Later, to verify the response received,
@@ -253,13 +253,13 @@
 .sp 0
 	struct opie opiedata;
 .sp 0
-	char opieprompt[OPIE_PROMPT_MAX+1];
+	char opieprompt[OPIE_CHALLENGE_MAX+1];
 .sp 0
 		.
 .sp 0
 		.
 .sp 0
-	opiechallenge(&opiedata, user_name, &opieprompt);
+	opiechallenge(&opiedata, user_name, opieprompt);
 .sp 0
 		.
 .sp 0

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: chris 
State-Changed-When: Wed Jan 19 14:08:31 PST 2000 
State-Changed-Why:  
Committed, thanks! 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/16209: commit references a PR
Date: Mon,  9 Apr 2012 14:05:21 +0000 (UTC)

 Author: andreast
 Date: Mon Apr  9 14:05:01 2012
 New Revision: 234055
 URL: http://svn.freebsd.org/changeset/base/234055
 
 Log:
   MFC r233783:
   
     - Write the ISO9660 descriptor after the apm partition entries.
     - Fill the needed pmPartStatus flags. At least the OpenBIOS
       implementation relies on these flags.
   
     This commit fixes the panic seen on OS-X when inserting a FreeBSD/ppc disc.
     Additionally OpenBIOS recognizes the partition where the boot code is located.
     This lets us load a FreeBSD/ppc PowerMac kernel inside qemu.
   
   PR:	powerpc/16209
 
 Modified:
   stable/9/usr.sbin/makefs/cd9660/cd9660_eltorito.c
 
 Modified: stable/9/usr.sbin/makefs/cd9660/cd9660_eltorito.c
 ==============================================================================
 --- stable/9/usr.sbin/makefs/cd9660/cd9660_eltorito.c	Mon Apr  9 13:29:24 2012	(r234054)
 +++ stable/9/usr.sbin/makefs/cd9660/cd9660_eltorito.c	Mon Apr  9 14:05:01 2012	(r234055)
 @@ -538,9 +538,19 @@ cd9660_write_apm_partition_entry(FILE *f
      off_t sector_start, off_t nsectors, off_t sector_size,
      const char *part_name, const char *part_type)
  {
 -	uint32_t apm32;
 +	uint32_t apm32, part_status;
  	uint16_t apm16;
  
 +	/* See Apple Tech Note 1189 for the details about the pmPartStatus
 +	 * flags.
 +	 * Below the flags which are default:
 +	 * - IsValid     0x01
 +	 * - IsAllocated 0x02
 +	 * - IsReadable  0x10
 +	 * - IsWritable  0x20
 +	 */
 +	part_status = 0x01 | 0x02 | 0x10 | 0x20;
 +
  	if (fseeko(fd, (off_t)(idx + 1) * sector_size, SEEK_SET) == -1)
  		err(1, "fseeko");
  
 @@ -562,6 +572,17 @@ cd9660_write_apm_partition_entry(FILE *f
  	fwrite(part_name, strlen(part_name) + 1, 1, fd);
  	fseek(fd, 32 - strlen(part_name) - 1, SEEK_CUR);
  	fwrite(part_type, strlen(part_type) + 1, 1, fd);
 +	fseek(fd, 32 - strlen(part_type) - 1, SEEK_CUR);
 +
 +	apm32 = 0;
 +	/* pmLgDataStart */
 +        fwrite(&apm32, sizeof(apm32), 1, fd);
 +	/* pmDataCnt */ 
 +	apm32 = htobe32(nsectors);
 +        fwrite(&apm32, sizeof(apm32), 1, fd);
 +	/* pmPartStatus */
 +	apm32 = htobe32(part_status);
 +        fwrite(&apm32, sizeof(apm32), 1, fd);
  
  	return 0;
  }
 @@ -666,12 +687,6 @@ cd9660_write_boot(FILE *fd)
  		cd9660_write_apm_partition_entry(fd, 0, total_parts, 1,
  		    total_parts, 512, "Apple", "Apple_partition_map");
  
 -		/* Write ISO9660 descriptor, enclosing the whole disk */
 -		cd9660_write_apm_partition_entry(fd, 1, total_parts, 0,
 -		    diskStructure.totalSectors *
 -		    (diskStructure.sectorSize / 512), 512, "ISO9660",
 -		    "CD_ROM_Mode_1");
 -
  		/* Write all partition entries */
  		apm_partitions = 0;
  		TAILQ_FOREACH(t, &diskStructure.boot_images, image_list) {
 @@ -679,11 +694,16 @@ cd9660_write_boot(FILE *fd)
  				continue;
  
  			cd9660_write_apm_partition_entry(fd,
 -			    2 + apm_partitions++, total_parts,
 +			    1 + apm_partitions++, total_parts,
  			    t->sector * (diskStructure.sectorSize / 512),
  			    t->num_sectors * (diskStructure.sectorSize / 512),
  			    512, "CD Boot", "Apple_Bootstrap");
  		}
 +		/* Write ISO9660 descriptor, enclosing the whole disk */
 +                cd9660_write_apm_partition_entry(fd, 2 + apm_partitions,
 +		    total_parts, 0, diskStructure.totalSectors *
 +		    (diskStructure.sectorSize / 512), 512, "ISO9660",
 +		    "CD_ROM_Mode_1");
  	}
  
  	return 0;
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
