Many files:

block.c (ext2fs_block_iterate2): Use retval which is a errcode_t type.
  bitmaps.c (make_bitmap): Use size_t instead of int where appropriate.
  bb_inode.c (set_bad_block_proc): Add #pragma argsused for Turbo C.
  alloc.c (ext2fs_new_inode): Use ino_t instead of int for the group number.
  get_pathname.c: Use ino_t instead of int where appropriate.
  ext2fs.h: Make the magic structure element be errcode_t instead of int.
  alloc.c alloc_tables.c badblocks.c bb_compat.c bb_inode.c
  	bitmaps.c block.c bmove.c brel_ma.c check_desc.c closefs.c
  	cmp_bitmaps.c dblist.c dblist_dir.c dir_iterate.c dirblock.c
  	dupfs.c expanddir.c freefs.c get_pathname.c icount.c
  	initialize.c inline.c inode.c irel_ma.c link.c llseek.c
  	lookup.c mkdir.c namei.c newdir.c read_bb.c read_bb_file.c
  	rs_bitmap.c rw_bitmaps.c swapfs.c test_io.c tst_badblocks.c
  	tst_iscan.c unix_io.c unlink.c valid_blk.c version.c: Add an
  	#ifdef for HAVE_UNISTD_H
This commit is contained in:
Theodore Ts'o 1997-08-10 23:07:40 +00:00
parent a47b66ee09
commit 4cbe8af4b0
45 changed files with 141 additions and 12 deletions

View File

@ -1,3 +1,31 @@
Sun Aug 10 10:05:22 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
* block.c (ext2fs_block_iterate2): Use retval which is a errcode_t
type.
* bitmaps.c (make_bitmap): Use size_t instead of int where
appropriate.
* bb_inode.c (set_bad_block_proc): Add #pragma argsused for Turbo C.
* alloc.c (ext2fs_new_inode): Use ino_t instead of int for the
group number.
* get_pathname.c: Use ino_t instead of int where appropriate.
* ext2fs.h: Make the magic structure element be errcode_t instead
of int.
* alloc.c alloc_tables.c badblocks.c bb_compat.c bb_inode.c
bitmaps.c block.c bmove.c brel_ma.c check_desc.c closefs.c
cmp_bitmaps.c dblist.c dblist_dir.c dir_iterate.c
dirblock.c dupfs.c expanddir.c freefs.c get_pathname.c
icount.c initialize.c inline.c inode.c irel_ma.c link.c
llseek.c lookup.c mkdir.c namei.c newdir.c read_bb.c
read_bb_file.c rs_bitmap.c rw_bitmaps.c swapfs.c
test_io.c tst_badblocks.c tst_iscan.c unix_io.c unlink.c
valid_blk.c version.c: Add an #ifdef for HAVE_UNISTD_H
Tue Jun 17 01:33:20 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
* unix_io.c (unix_read_blk): If ext2fs_llseek() fails, but errno

View File

@ -11,7 +11,9 @@
*/
#include <stdio.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <time.h>
#include <sys/stat.h>
@ -33,7 +35,7 @@
errcode_t ext2fs_new_inode(ext2_filsys fs, ino_t dir, int mode,
ext2fs_inode_bitmap map, ino_t *ret)
{
int dir_group = 0;
ino_t dir_group = 0;
ino_t i;
ino_t start_inode;

View File

@ -12,7 +12,9 @@
#include <stdio.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <fcntl.h>
#include <time.h>

View File

@ -11,7 +11,9 @@
#include <stdio.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <fcntl.h>
#include <time.h>

View File

@ -11,7 +11,9 @@
#include <stdio.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <fcntl.h>
#include <time.h>

View File

@ -15,7 +15,9 @@
#include <stdio.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <fcntl.h>
#include <time.h>
@ -154,6 +156,9 @@ cleanup:
* Clear the bad blocks in the bad block inode, while saving the
* indirect blocks.
*/
#ifdef __TURBOC__
#pragma argsused
#endif
static int clear_bad_block_proc(ext2_filsys fs, blk_t *block_nr, int blockcnt,
blk_t ref_block, int ref_offset, void *private)
{
@ -207,6 +212,9 @@ static int clear_bad_block_proc(ext2_filsys fs, blk_t *block_nr, int blockcnt,
*
* Set the block list in the bad block inode, using the supplied bitmap.
*/
#ifdef __TURBOC__
#pragma argsused
#endif
static int set_bad_block_proc(ext2_filsys fs, blk_t *block_nr,
int blockcnt, blk_t ref_block,
int ref_offset, void *private)

View File

@ -12,7 +12,9 @@
#include <stdio.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <fcntl.h>
#include <time.h>
@ -31,7 +33,7 @@ static errcode_t make_bitmap(__u32 start, __u32 end, __u32 real_end,
ext2fs_generic_bitmap *ret)
{
ext2fs_generic_bitmap bitmap;
int size;
size_t size;
bitmap = malloc(sizeof(struct ext2fs_struct_generic_bitmap));
if (!bitmap)
@ -53,7 +55,7 @@ static errcode_t make_bitmap(__u32 start, __u32 end, __u32 real_end,
} else
bitmap->description = 0;
size = ((bitmap->real_end - bitmap->start) / 8) + 1;
size = (size_t) (((bitmap->real_end - bitmap->start) / 8) + 1);
bitmap->bitmap = malloc(size);
if (!bitmap->bitmap) {
free(bitmap->description);
@ -187,7 +189,7 @@ void ext2fs_clear_inode_bitmap(ext2fs_inode_bitmap bitmap)
return;
memset(bitmap->bitmap, 0,
((bitmap->real_end - bitmap->start) / 8) + 1);
(size_t) (((bitmap->real_end - bitmap->start) / 8) + 1));
}
void ext2fs_clear_block_bitmap(ext2fs_block_bitmap bitmap)
@ -196,5 +198,5 @@ void ext2fs_clear_block_bitmap(ext2fs_block_bitmap bitmap)
return;
memset(bitmap->bitmap, 0,
((bitmap->real_end - bitmap->start) / 8) + 1);
(size_t) (((bitmap->real_end - bitmap->start) / 8) + 1));
}

View File

@ -11,7 +11,9 @@
#include <stdio.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#if HAVE_ERRNO_H
#include <errno.h>
@ -321,9 +323,9 @@ errcode_t ext2fs_block_iterate2(ext2_filsys fs,
EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
ret = ext2fs_get_blocks(fs, ino, blocks);
if (ret)
return ret;
retval = ext2fs_get_blocks(fs, ino, blocks);
if (retval)
return retval;
ctx.fs = fs;
ctx.func = func;

View File

@ -8,7 +8,9 @@
#include <stdio.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <sys/types.h>
#include <sys/time.h>

View File

@ -13,8 +13,12 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#if HAVE_ERRNO_H
#include <errno.h>
#endif
#include <linux/ext2_fs.h>

View File

@ -11,7 +11,9 @@
#include <stdio.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <fcntl.h>
#include <time.h>

View File

@ -10,7 +10,9 @@
*/
#include <stdio.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <time.h>
#include <string.h>

View File

@ -11,7 +11,9 @@
#include <stdio.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <fcntl.h>
#include <time.h>

View File

@ -11,7 +11,9 @@
*/
#include <stdio.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <string.h>
#include <time.h>

View File

@ -11,7 +11,9 @@
*/
#include <stdio.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <string.h>
#include <time.h>

View File

@ -11,7 +11,9 @@
#include <stdio.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#if HAVE_ERRNO_H
#include <errno.h>

View File

@ -10,7 +10,9 @@
*/
#include <stdio.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <string.h>
#include <time.h>

View File

@ -10,7 +10,9 @@
*/
#include <stdio.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <time.h>
#include <string.h>

View File

@ -11,7 +11,9 @@
#include <stdio.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#if HAVE_ERRNO_H
#include <errno.h>

View File

@ -45,7 +45,7 @@ typedef unsigned int dgrp_t;
typedef struct struct_ext2_filsys *ext2_filsys;
struct ext2fs_struct_generic_bitmap {
int magic;
errcode_t magic;
ext2_filsys fs;
__u32 start, end;
__u32 real_end;
@ -119,7 +119,7 @@ typedef struct ext2_struct_dblist *ext2_dblist;
#define EXT2_NEW_INODE_FL 0x80000000
struct struct_ext2_filsys {
int magic;
errcode_t magic;
io_channel io;
int flags;
char * device_name;

View File

@ -10,7 +10,9 @@
*/
#include <stdio.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <linux/ext2_fs.h>

View File

@ -20,7 +20,9 @@
#include <stdio.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#if HAVE_ERRNO_H
#include <errno.h>
@ -31,12 +33,15 @@
#include "ext2fs.h"
struct get_pathname_struct {
int search_ino;
int parent;
ino_t search_ino;
ino_t parent;
char *name;
errcode_t errcode;
};
#ifdef __TURBOC__
#pragma argsused
#endif
static int get_pathname_proc(struct ext2_dir_entry *dirent,
int offset,
int blocksize,

View File

@ -10,7 +10,9 @@
*/
#include <et/com_err.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <string.h>
#include <stdio.h>

View File

@ -12,7 +12,9 @@
#include <stdio.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <fcntl.h>
#include <time.h>

View File

@ -14,7 +14,9 @@
#include <stdio.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <fcntl.h>
#include <time.h>

View File

@ -11,7 +11,9 @@
#include <stdio.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/types.h>

View File

@ -13,8 +13,12 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#if HAVE_ERRNO_H
#include <errno.h>
#endif
#include <linux/ext2_fs.h>

View File

@ -11,7 +11,9 @@
#include <stdio.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <linux/ext2_fs.h>

View File

@ -12,14 +12,18 @@
#include <sys/types.h>
#include <errno.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "et/com_err.h"
#include "ext2fs/io.h"
#ifdef __linux__
#ifdef HAVE_LLSEEK
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <syscall.h>
#else /* HAVE_LLSEEK */

View File

@ -11,7 +11,9 @@
#include <stdio.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#if HAVE_ERRNO_H
#include <errno.h>

View File

@ -11,7 +11,9 @@
#include <stdio.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <fcntl.h>
#include <time.h>

View File

@ -11,7 +11,9 @@
#include <stdio.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#if HAVE_ERRNO_H
#include <errno.h>

View File

@ -11,7 +11,9 @@
#include <stdio.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#if HAVE_ERRNO_H
#include <errno.h>

View File

@ -11,7 +11,9 @@
#include <stdio.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <fcntl.h>
#include <time.h>

View File

@ -11,7 +11,9 @@
#include <stdio.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <fcntl.h>
#include <time.h>

View File

@ -11,7 +11,9 @@
#include <stdio.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <fcntl.h>
#include <time.h>

View File

@ -11,7 +11,9 @@
#include <stdio.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <fcntl.h>
#include <time.h>

View File

@ -10,7 +10,9 @@
*/
#include <stdio.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <time.h>

View File

@ -11,7 +11,9 @@
#include <stdio.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <fcntl.h>
#include <time.h>

View File

@ -11,7 +11,9 @@
#include <stdio.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <fcntl.h>
#include <time.h>

View File

@ -11,7 +11,9 @@
#include <stdio.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <fcntl.h>
#include <time.h>

View File

@ -13,7 +13,9 @@
#include <stdio.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <fcntl.h>
#include <time.h>

View File

@ -11,7 +11,9 @@
#include <stdio.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <linux/ext2_fs.h>

View File

@ -11,7 +11,9 @@
*/
#include <stdio.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <string.h>
#include <time.h>

View File

@ -10,7 +10,9 @@
*/
#include <et/com_err.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <string.h>
#include <stdio.h>