1
0
forked from pool/util-linux
util-linux/mkfs.bfs_cleanup_64bit.patch
Stephan Kulow 492e97410d Accepting request 177735 from Base:System
Added mkfs.bfs_cleanup64bit.patch and mkfs.bfs_cleanup_endian.patch to fix 64Bit and endian issues. (forwarded request 177733 from ihno)

OBS-URL: https://build.opensuse.org/request/show/177735
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=159
2013-06-05 17:36:12 +00:00

67 lines
1.7 KiB
Diff

bla fasel
--- util-linux-2.21.2.orig/disk-utils/mkfs.bfs.c
+++ util-linux-2.21.2/disk-utils/mkfs.bfs.c
@@ -1,6 +1,7 @@
/*
* mkfs.bfs - Create SCO BFS filesystem - aeb, 1999-09-07
*
+ * Usage: mkfs.bfs [-N nr-of-inodes] [-V volume-name] [-F fsname] device
*/
#include <errno.h>
@@ -27,13 +28,13 @@
/* superblock - 512 bytes */
struct bfssb {
- unsigned int s_magic;
- unsigned int s_start; /* byte offset of start of data */
- unsigned int s_end; /* sizeof(slice)-1 */
+ uint32_t s_magic;
+ uint32_t s_start; /* byte offset of start of data */
+ uint32_t s_end; /* sizeof(slice)-1 */
/* for recovery during compaction */
- int s_from, s_to; /* src and dest block of current transfer */
- int s_backup_from, s_backup_to;
+ uint32_t s_from, s_to; /* src and dest block of current transfer */
+ int32_t s_backup_from, s_backup_to;
/* labels - may well contain garbage */
char s_fsname[6];
@@ -43,16 +44,16 @@
/* inode - 64 bytes */
struct bfsi {
- unsigned short i_ino;
+ uint16_t i_ino;
unsigned char i_pad1[2];
- unsigned long i_first_block;
- unsigned long i_last_block;
- unsigned long i_bytes_to_end;
- unsigned long i_type; /* 1: file, 2: the unique dir */
- unsigned long i_mode;
- unsigned long i_uid, i_gid;
- unsigned long i_nlinks;
- unsigned long i_atime, i_mtime, i_ctime;
+ uint32_t i_first_block;
+ uint32_t i_last_block;
+ uint32_t i_bytes_to_end;
+ uint32_t i_type; /* 1: file, 2: the unique dir */
+ uint32_t i_mode;
+ uint32_t i_uid, i_gid;
+ uint32_t i_nlinks;
+ uint32_t i_atime, i_mtime, i_ctime;
unsigned char i_pad2[16];
};
@@ -60,7 +61,7 @@
/* directory entry - 16 bytes */
struct bfsde {
- unsigned short d_ino;
+ uint16_t d_ino;
char d_name[BFS_NAMELEN];
};