Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 107572 | Differences between
and this patch

Collapse All | Expand All

(-)bcrypt.orig/src/bcformat.c (-9 / +24 lines)
Lines 29-34 Link Here
29
#include "bctool.h"
29
#include "bctool.h"
30
#include "misc.h"
30
#include "misc.h"
31
#include "error.h"
31
#include "error.h"
32
#include <sys/stat.h>
32
33
33
char bcformat_c[]="$Id: bcformat.c,v 1.20 2005/05/14 07:58:33 crypt Rel-1.6-1 $";
34
char bcformat_c[]="$Id: bcformat.c,v 1.20 2005/05/14 07:58:33 crypt Rel-1.6-1 $";
34
35
Lines 45-51 Link Here
45
    DATA_BLOCK db, *pdb;
46
    DATA_BLOCK db, *pdb;
46
    alg_info *alg_inf;
47
    alg_info *alg_inf;
47
    char *command[16];
48
    char *command[16];
48
49
    struct stat mkfs_path;
49
   
50
   
50
    if ( argc < 2 )
51
    if ( argc < 2 )
51
    {
52
    {
Lines 188-202 Link Here
188
//----------------------------------------------------------------------    
189
//----------------------------------------------------------------------    
189
//----------------------------------------------------------------------    
190
//----------------------------------------------------------------------    
190
191
191
    if (0 == strcasecmp(o_fstype,"vfat"))
192
    if (0 == strcasecmp(o_fstype,"vfat") || 0 == strcasecmp(o_fstype,"msdos"))
192
    {
193
    {
193
	command[0]="/sbin/mkfs";
194
194
        command[1]="-t";
195
	/* Hardcode path if we don't have /sbin/mkfs.msdos */
195
        command[2]="msdos";
196
	if (stat("/sbin/mkfs.msdos", &mkfs_path) == -1 && errno == ENOENT)
196
        command[3]="-F";
197
	{
197
        command[4]="32";
198
		command[0]="/usr/sbin/mkfs.msdos";
198
        command[5]=device;
199
	        command[1]="-F";
199
        command[6]=0;
200
        	command[2]="32";
201
	        command[3]=device;
202
	        command[4]=0;
203
	}
204
	else
205
	{
206
		command[0]="/sbin/mkfs";
207
		command[1]="-t";
208
		command[2]="msdos";
209
	        command[3]="-F";
210
        	command[4]="32";
211
	        command[5]=device;
212
	        command[6]=0;
213
	}
214
200
    }else if (0 == strcasecmp(o_fstype,"ext2") || 0 == strcasecmp(o_fstype,"ext3") )
215
    }else if (0 == strcasecmp(o_fstype,"ext2") || 0 == strcasecmp(o_fstype,"ext3") )
201
    {
216
    {
202
        command[0]="/sbin/mkfs";
217
        command[0]="/sbin/mkfs";

Return to bug 107572