{
FILE *proc;
char line[1024];
- char ptname0[128], ptname1[128], *ptname = 0;
+ char ptname0[128], ptname1[128], *ptname = NULL;
char *ptnames[2];
dev_t devs[2];
int ma, mi;
static void get_ext2_info(blkid_dev dev, unsigned char *buf)
{
struct ext2_super_block *es = (struct ext2_super_block *) buf;
- const char *label = 0;
+ const char *label = NULL;
DBG(DEBUG_PROBE, printf("ext2_sb.compat = %08X:%08X:%08X\n",
blkid_le32(es->s_feature_compat),
{
struct vfat_super_block *vs;
char serno[10];
- const char *label = 0;
+ const char *label = NULL;
int label_len = 0;
vs = (struct vfat_super_block *)buf;
{
struct msdos_super_block *ms = (struct msdos_super_block *) buf;
char serno[10];
- const char *label = 0;
+ const char *label = NULL;
int label_len = 0;
if (strncmp(ms->ms_label, "NO NAME", 7)) {
unsigned char *buf)
{
struct xfs_super_block *xs;
- const char *label = 0;
+ const char *label = NULL;
xs = (struct xfs_super_block *)buf;
{
struct reiserfs_super_block *rs = (struct reiserfs_super_block *) buf;
unsigned int blocksize;
- const char *label = 0;
+ const char *label = NULL;
blocksize = blkid_le16(rs->rs_blocksize);
unsigned char *buf)
{
struct jfs_super_block *js;
- const char *label = 0;
+ const char *label = NULL;
js = (struct jfs_super_block *)buf;
unsigned char *buf)
{
struct romfs_super_block *ros;
- const char *label = 0;
+ const char *label = NULL;
ros = (struct romfs_super_block *)buf;
unsigned char *buf)
{
struct cramfs_super_block *csb;
- const char *label = 0;
+ const char *label = NULL;
csb = (struct cramfs_super_block *)buf;
{
blkid_dev dev;
blkid_cache c = cache;
- char *t = 0, *v = 0;
+ char *t = NULL, *v = NULL;
char *ret = NULL;
if (!token)
const char *value, const int vlength)
{
blkid_tag t = 0, head = 0;
- char *val = 0;
+ char *val = NULL;
if (!dev || !name)
return -BLKID_ERR_PARAM;
struct buffer_head *bh;
struct inode *j_inode = NULL;
struct kdev_s *dev_fs = NULL, *dev_journal;
- const char *journal_name = 0;
+ const char *journal_name = NULL;
journal_t *journal = NULL;
errcode_t retval = 0;
io_manager io_ptr = 0;
struct dir_info *subdir, *dir;
struct dx_dir_info *dx_dir;
#ifdef ENABLE_HTREE
- struct dx_dirblock_info *dx_db = 0;
+ struct dx_dirblock_info *dx_db = NULL;
#endif /* ENABLE_HTREE */
struct ext2_dir_entry *dirent, *prev;
ext2_dirhash_t hash;
struct ext2_inode inode;
struct problem_context pctx;
__u16 link_count, link_counted;
- char *buf = 0;
+ char *buf = NULL;
int group, maxgroup;
/* Pass 4 */
{
ext2_filsys fs = ctx->fs;
const struct e2fsck_problem *ptr;
- struct latch_descr *ldesc = 0;
+ struct latch_descr *ldesc = NULL;
const char *message;
int def_yn, answer, ans;
int print_answer = 0;
ext2_ino_t parent)
{
struct ext2_dx_root_info *root_info;
- struct ext2_dx_entry *root, *dx_ent = 0;
+ struct ext2_dx_entry *root, *dx_ent = NULL;
struct ext2_dx_countlimit *root_limit, *limit;
errcode_t retval;
char * block_start;
ext2_filsys fs = ctx->fs;
errcode_t retval;
struct ext2_inode inode;
- char *dir_buf = 0;
+ char *dir_buf = NULL;
struct fill_dir_struct fd;
struct out_dir outdir;
struct problem_context pctx;
int i, j, gdt_off, ind_off;
blk_t blk, pblk, expect;
- __u32 *dind_buf = 0, *ind_buf;
+ __u32 *dind_buf = NULL, *ind_buf;
errcode_t retval;
clear_problem_context(&pctx);
e2fsck_t ctx;
errcode_t retval;
struct sigaction sa;
- char *extended_opts = 0;
+ char *extended_opts = NULL;
retval = e2fsck_allocate_context(&ctx);
if (retval)
{
errcode_t retval;
blk_t block;
- char *buf = 0;
+ char *buf = NULL;
if (!block_buf) {
retval = ext2fs_get_mem(fs->blocksize, &buf);
struct ext2_inode inode_buf;
blk_t addr_per_block;
blk_t b;
- char *buf = 0;
+ char *buf = NULL;
errcode_t retval = 0;
int blocks_alloc = 0, inode_dirty = 0;
blk_t group_block;
errcode_t retval;
unsigned long fs_state;
- struct ext2_super_block *super_shadow = 0;
- struct ext2_group_desc *group_shadow = 0;
+ struct ext2_super_block *super_shadow = NULL;
+ struct ext2_group_desc *group_shadow = NULL;
char *group_ptr;
int old_desc_blocks;
#if BB_BIG_ENDIAN
int do_swap = 0;
errcode_t retval;
char *p, *end;
- char *buf = 0;
+ char *buf = NULL;
struct ext2_dir_entry *dirent;
if ((fs->flags & EXT2_FLAG_SWAP_BYTES) ||
{
errcode_t retval;
struct ext2_ext_attr_header *header;
- char *buf = 0;
+ char *buf = NULL;
if ((blk >= fs->super->s_blocks_count) ||
(blk < fs->super->s_first_data_block))
*/
char *ext2fs_find_block_device(dev_t device)
{
- struct dir_list *list = 0, *new_list = 0;
+ struct dir_list *list = NULL, *new_list = NULL;
struct dir_list *current;
- char *ret_path = 0;
+ char *ret_path = NULL;
/*
* Add the starting directories to search...
*/
errcode_t ext2fs_image_bitmap_read(ext2_filsys fs, int fd, int flags)
{
- char *ptr, *buf = 0;
+ char *ptr, *buf = NULL;
int size;
ssize_t actual;
errcode_t retval;
ext2_ino_t ino = inum;
ext2_ino_t scratch_ino;
blk_t blk;
- char *block = 0;
+ char *block = NULL;
EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
blk_t size, int flags)
{
errcode_t retval;
- char *buf = 0;
+ char *buf = NULL;
int fd, ret_size;
blk_t i;
char *buf, ext2_ino_t *res_inode)
{
char *pathname;
- char *buffer = 0;
+ char *buffer = NULL;
errcode_t retval;
struct ext2_inode ei;
static errcode_t read_bitmaps(ext2_filsys fs, int do_inode, int do_block)
{
dgrp_t i;
- char *block_bitmap = 0, *inode_bitmap = 0;
+ char *block_bitmap = NULL, *inode_bitmap = NULL;
char *buf;
errcode_t retval;
int block_nbytes = (int) EXT2_BLOCKS_PER_GROUP(fs->super) / 8;
static void PRS(int argc, char **argv)
{
int i, j;
- char *arg, *dev, *tmp = 0;
+ char *arg, *dev, *tmp = NULL;
char options[128];
int opt = 0;
int opts_for_fsck = 0;
int show_version_only = 0;
ext2_ino_t num_inodes = 0;
errcode_t retval;
- char * extended_opts = 0;
- const char * fs_type = 0;
+ char * extended_opts = NULL;
+ const char * fs_type = NULL;
blk_t dev_size;
long sysval;
static int
docd(const char *dest, int flags)
{
- const char *dir = 0;
+ const char *dir = NULL;
int err;
TRACE(("docd(\"%s\", %d) called\n", dest, flags));