Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 69802 Details for
Bug 107572
bctool uses hardcoded location for mkfs.msdos
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
bestcrypt-1.6_p1-mkfs-path.diff
bestcrypt-1.6_p1-mkfs-path.diff (text/plain), 1.53 KB, created by
Marcelo Goes (RETIRED)
on 2005-10-03 11:17:57 UTC
(
hide
)
Description:
bestcrypt-1.6_p1-mkfs-path.diff
Filename:
MIME Type:
Creator:
Marcelo Goes (RETIRED)
Created:
2005-10-03 11:17:57 UTC
Size:
1.53 KB
patch
obsolete
>--- bcrypt.orig/src/bcformat.c 2005-09-29 15:38:18.000000000 -0300 >+++ bcrypt/src/bcformat.c 2005-10-03 15:15:53.000000000 -0300 >@@ -29,6 +29,7 @@ > #include "bctool.h" > #include "misc.h" > #include "error.h" >+#include <sys/stat.h> > > char bcformat_c[]="$Id: bcformat.c,v 1.20 2005/05/14 07:58:33 crypt Rel-1.6-1 $"; > >@@ -45,7 +46,7 @@ > DATA_BLOCK db, *pdb; > alg_info *alg_inf; > char *command[16]; >- >+ struct stat mkfs_path; > > if ( argc < 2 ) > { >@@ -188,15 +189,29 @@ > //---------------------------------------------------------------------- > //---------------------------------------------------------------------- > >- if (0 == strcasecmp(o_fstype,"vfat")) >+ if (0 == strcasecmp(o_fstype,"vfat") || 0 == strcasecmp(o_fstype,"msdos")) > { >- command[0]="/sbin/mkfs"; >- command[1]="-t"; >- command[2]="msdos"; >- command[3]="-F"; >- command[4]="32"; >- command[5]=device; >- command[6]=0; >+ >+ /* Hardcode path if we don't have /sbin/mkfs.msdos */ >+ if (stat("/sbin/mkfs.msdos", &mkfs_path) == -1 && errno == ENOENT) >+ { >+ command[0]="/usr/sbin/mkfs.msdos"; >+ command[1]="-F"; >+ command[2]="32"; >+ command[3]=device; >+ command[4]=0; >+ } >+ else >+ { >+ command[0]="/sbin/mkfs"; >+ command[1]="-t"; >+ command[2]="msdos"; >+ command[3]="-F"; >+ command[4]="32"; >+ command[5]=device; >+ command[6]=0; >+ } >+ > }else if (0 == strcasecmp(o_fstype,"ext2") || 0 == strcasecmp(o_fstype,"ext3") ) > { > command[0]="/sbin/mkfs";
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 107572
:
69684
|
69799
| 69802 |
72755