From olgeni@uli.it  Sat Sep  2 13:15:30 2000
Return-Path: <olgeni@uli.it>
Received: from vega.uli.it (vega.uli.it [62.212.0.2])
	by hub.freebsd.org (Postfix) with ESMTP id AF35F37B422
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  2 Sep 2000 13:15:29 -0700 (PDT)
Received: from olgeni.uli.it (olgeni.uli.it [62.212.0.22])
	by vega.uli.it (Postfix) with ESMTP id 3F16F3B00C
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  2 Sep 2000 22:15:28 +0200 (CEST)
Message-Id: <Pine.BSF.4.21.0009021937040.20629-100000@olgeni.localdomain.net>
Date: Sat, 2 Sep 2000 22:15:43 +0200 (CEST)
From: Jimmy Olgeni <olgeni@uli.it>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [PATCH] fix messages in mtools port

>Number:         20999
>Category:       ports
>Synopsis:       [PATCH] fix messages in mtools port
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    jmz
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Sep 02 13:20:01 PDT 2000
>Closed-Date:    Sat Nov 25 20:14:39 PST 2000
>Last-Modified:  Sat Nov 25 20:15:03 PST 2000
>Originator:     Jimmy Olgeni
>Release:        FreeBSD 4.1-STABLE i386
>Organization:
Colby
>Environment:

Current mtools port (version 3.9.6)

>Description:

Changes
=======

Makefile:

	post-patch target:

		Add mformat.c to the list of files processed by sed, so
that it can correctly report PREFIX/etc/mtools.conf as its configuration file.

patches/patch-g:

		New file. Patch mformat.c, replace "/etc/mtools" with
"/etc/mtools.conf", else sed will fail to replace the correct
configuration path. If I remember, "/etc/mtools" is the old name of
the configuration file in previous releases of mtools, and it is no
longer used.

>How-To-Repeat:

>Fix:

diff -rcN mtools.orig/Makefile mtools/Makefile
*** mtools.orig/Makefile	Wed Jun 14 19:35:13 2000
--- mtools/Makefile	Wed Aug 16 12:22:55 2000
***************
*** 25,31 ****
  MAN5=		mtools.5
  
  post-patch:
! 	@cd ${WRKSRC}; for f in config.c mtools.5 mtools.texi; do \
  	 ${MV} $$f $$f.orig; \
  	 ${SED} -e s:/etc/mtools.conf:${PREFIX}/etc/mtools.conf: \
  	 < $$f.orig > $$f; done
--- 25,31 ----
  MAN5=		mtools.5
  
  post-patch:
! 	@cd ${WRKSRC}; for f in config.c mtools.5 mformat.c mtools.texi; do \
  	 ${MV} $$f $$f.orig; \
  	 ${SED} -e s:/etc/mtools.conf:${PREFIX}/etc/mtools.conf: \
  	 < $$f.orig > $$f; done
diff -rcN mtools.orig/patches/patch-g mtools/patches/patch-g
*** mtools.orig/patches/patch-g	Thu Jan  1 01:00:00 1970
--- mtools/patches/patch-g	Sat Sep  2 20:26:42 2000
***************
*** 0 ****
--- 1,31 ----
+ *** mformat.c.orig	Wed Aug 16 12:25:39 2000
+ --- mformat.c	Wed Aug 16 12:26:01 2000
+ ***************
+ *** 348,360 ****
+   
+   	if ( Fs->num_clus > FAT12 && Fs->fat_bits == 12 ){
+   		fprintf(stderr,"Too many clusters for this fat size."
+ ! 			" Please choose a 16-bit fat in your /etc/mtools"
+   			" or .mtoolsrc file\n");
+   		exit(1);
+   	}
+   	if ( Fs->num_clus <= FAT12 && Fs->fat_bits > 12 ){
+   		fprintf(stderr,"Too few clusters for this fat size."
+ ! 			" Please choose a 12-bit fat in your /etc/mtools"
+   			" or .mtoolsrc file\n");
+   		exit(1);
+   	}
+ --- 348,360 ----
+   
+   	if ( Fs->num_clus > FAT12 && Fs->fat_bits == 12 ){
+   		fprintf(stderr,"Too many clusters for this fat size."
+ ! 			" Please choose a 16-bit fat in your /etc/mtools.conf"
+   			" or .mtoolsrc file\n");
+   		exit(1);
+   	}
+   	if ( Fs->num_clus <= FAT12 && Fs->fat_bits > 12 ){
+   		fprintf(stderr,"Too few clusters for this fat size."
+ ! 			" Please choose a 12-bit fat in your /etc/mtools.conf"
+   			" or .mtoolsrc file\n");
+   		exit(1);
+   	}



>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports->jmz 
Responsible-Changed-By: sobomax 
Responsible-Changed-When: Mon Sep 4 08:27:13 PDT 2000 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=20999 
State-Changed-From-To: open->closed 
State-Changed-By: jmz 
State-Changed-When: Sat Nov 25 20:14:39 PST 2000 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=20999 
>Unformatted:
