summaryrefslogtreecommitdiffstats
path: root/debugfs/debugfs.h
diff options
context:
space:
mode:
Diffstat (limited to 'debugfs/debugfs.h')
-rw-r--r--debugfs/debugfs.h209
1 files changed, 104 insertions, 105 deletions
diff --git a/debugfs/debugfs.h b/debugfs/debugfs.h
index 39bc024..88d929c 100644
--- a/debugfs/debugfs.h
+++ b/debugfs/debugfs.h
@@ -36,7 +36,6 @@ extern int check_fs_not_open(char *name);
extern int check_fs_read_write(char *name);
extern int check_fs_bitmaps(char *name);
extern ext2_ino_t string_to_inode(char *str);
-extern char *inode_time_to_string(__u32 xtime, __u32 xtime_extra);
extern char *time_to_string(__s64);
extern __s64 string_to_time(const char *);
extern unsigned long parse_ulong(const char *str, const char *cmd,
@@ -45,12 +44,12 @@ extern unsigned long long parse_ulonglong(const char *str, const char *cmd,
const char *descr, int *err);
extern int strtoblk(const char *cmd, const char *str, const char *errmsg,
blk64_t *ret);
-extern int common_args_process(int argc, char *argv[], int min_argc,
+extern int common_args_process(int argc, ss_argv_t argv, int min_argc,
int max_argc, const char *cmd,
const char *usage, int flags);
-extern int common_inode_args_process(int argc, char *argv[],
+extern int common_inode_args_process(int argc, ss_argv_t argv,
ext2_ino_t *inode, int flags);
-extern int common_block_args_process(int argc, char *argv[],
+extern int common_block_args_process(int argc, ss_argv_t argv,
blk64_t *block, blk64_t *count);
extern int debugfs_read_inode(ext2_ino_t ino, struct ext2_inode * inode,
const char *cmd);
@@ -67,60 +66,60 @@ extern int ext2_file_type(unsigned int mode);
/* ss command functions */
/* dump.c */
-extern void do_dump(int argc, char **argv, int sci_idx, void *infop);
-extern void do_cat(int argc, char **argv, int sci_idx, void *infop);
-extern void do_rdump(int argc, char **argv, int sci_idx, void *infop);
+extern void do_dump(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_cat(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_rdump(int argc, ss_argv_t argv, int sci_idx, void *infop);
/* extent_inode.c */
-extern void do_extent_open(int argc, char **argv, int sci_idx, void *infop);
-extern void do_extent_close(int argc, char **argv, int sci_idx, void *infop);
-extern void do_current_node(int argc, char **argv, int sci_idx, void *infop);
-extern void do_root_node(int argc, char **argv, int sci_idx, void *infop);
-extern void do_last_leaf(int argc, char **argv, int sci_idx, void *infop);
-extern void do_first_sib(int argc, char **argv, int sci_idx, void *infop);
-extern void do_last_sib(int argc, char **argv, int sci_idx, void *infop);
-extern void do_next_sib(int argc, char **argv, int sci_idx, void *infop);
-extern void do_prev_sib(int argc, char **argv, int sci_idx, void *infop);
-extern void do_next_leaf(int argc, char **argv, int sci_idx, void *infop);
-extern void do_prev_leaf(int argc, char **argv, int sci_idx, void *infop);
-extern void do_next(int argc, char **argv, int sci_idx, void *infop);
-extern void do_prev(int argc, char **argv, int sci_idx, void *infop);
-extern void do_up(int argc, char **argv, int sci_idx, void *infop);
-extern void do_down(int argc, char **argv, int sci_idx, void *infop);
-extern void do_delete_node(int argc, char **argv, int sci_idx, void *infop);
-extern void do_replace_node(int argc, char **argv, int sci_idx, void *infop);
-extern void do_split_node(int argc, char **argv, int sci_idx, void *infop);
-extern void do_insert_node(int argc, char **argv, int sci_idx, void *infop);
-extern void do_set_bmap(int argc, char **argv, int sci_idx, void *infop);
-extern void do_print_all(int argc, char **argv, int sci_idx, void *infop);
-extern void do_fix_parents(int argc, char **argv, int sci_idx, void *infop);
-extern void do_info(int argc, char **argv, int sci_idx, void *infop);
-extern void do_goto_block(int argc, char **argv, int sci_idx, void *infop);
+extern void do_extent_open(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_extent_close(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_current_node(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_root_node(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_last_leaf(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_first_sib(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_last_sib(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_next_sib(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_prev_sib(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_next_leaf(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_prev_leaf(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_next(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_prev(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_up(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_down(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_delete_node(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_replace_node(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_split_node(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_insert_node(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_set_bmap(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_print_all(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_fix_parents(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_info(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_goto_block(int argc, ss_argv_t argv, int sci_idx, void *infop);
/* htree.c */
-extern void do_htree_dump(int argc, char **argv, int sci_idx, void *infop);
-extern void do_dx_hash(int argc, char **argv, int sci_idx, void *infop);
-extern void do_dirsearch(int argc, char **argv, int sci_idx, void *infop);
+extern void do_htree_dump(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_dx_hash(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_dirsearch(int argc, ss_argv_t argv, int sci_idx, void *infop);
/* logdump.c */
-extern void do_logdump(int argc, char **argv, int sci_idx, void *infop);
+extern void do_logdump(int argc, ss_argv_t argv, int sci_idx, void *infop);
/* lsdel.c */
-extern void do_lsdel(int argc, char **argv, int sci_idx, void *infop);
+extern void do_lsdel(int argc, ss_argv_t argv, int sci_idx, void *infop);
/* icheck.c */
-extern void do_icheck(int argc, char **argv, int sci_idx, void *infop);
+extern void do_icheck(int argc, ss_argv_t argv, int sci_idx, void *infop);
/* ncheck.c */
-extern void do_ncheck(int argc, char **argv, int sci_idx, void *infop);
+extern void do_ncheck(int argc, ss_argv_t argv, int sci_idx, void *infop);
/* set_fields.c */
-extern void do_set_super(int argc, char **, int sci_idx, void *infop);
-extern void do_set_inode(int argc, char **, int sci_idx, void *infop);
-extern void do_set_block_group_descriptor(int argc, char **, int sci_idx, void *infop);
+extern void do_set_super(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_set_inode(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_set_block_group_descriptor(int argc, ss_argv_t argv, int sci_idx, void *infop);
/* unused.c */
-extern void do_dump_unused(int argc, char **argv, int sci_idx, void *infop);
+extern void do_dump_unused(int argc, ss_argv_t argv, int sci_idx, void *infop);
/* debugfs.c */
extern ss_request_table *extra_cmds;
@@ -128,68 +127,68 @@ extern const char *debug_prog_name;
extern void internal_dump_inode(FILE *, const char *, ext2_ino_t,
struct ext2_inode *, int);
-extern void do_dirty_filesys(int argc, char **argv, int sci_idx, void *infop);
-extern void do_open_filesys(int argc, char **argv, int sci_idx, void *infop);
-extern void do_close_filesys(int argc, char **argv, int sci_idx, void *infop);
-extern void do_lcd(int argc, char **argv, int sci_idx, void *infop);
-extern void do_init_filesys(int argc, char **argv, int sci_idx, void *infop);
-extern void do_show_super_stats(int argc, char **argv, int sci_idx, void *infop);
-extern void do_kill_file(int argc, char **argv, int sci_idx, void *infop);
-extern void do_rm(int argc, char **argv, int sci_idx, void *infop);
-extern void do_link(int argc, char **argv, int sci_idx, void *infop);
-extern void do_undel(int argc, char **argv, int sci_idx, void *infop);
-extern void do_unlink(int argc, char **argv, int sci_idx, void *infop);
-extern void do_copy_inode(int argc, char *argv[], int sci_idx, void *infop);
-extern void do_find_free_block(int argc, char **argv, int sci_idx, void *infop);
-extern void do_find_free_inode(int argc, char **argv, int sci_idx, void *infop);
-extern void do_stat(int argc, char **argv, int sci_idx, void *infop);
-extern void do_dump_extents(int argc, char **argv, int sci_idx, void *infop);
-extern void do_blocks(int argc, char *argv[], int sci_idx, void *infop);
-
-extern void do_chroot(int argc, char **argv, int sci_idx, void *infop);
-extern void do_clri(int argc, char **argv, int sci_idx, void *infop);
-extern void do_freei(int argc, char **argv, int sci_idx, void *infop);
-extern void do_seti(int argc, char **argv, int sci_idx, void *infop);
-extern void do_testi(int argc, char **argv, int sci_idx, void *infop);
-extern void do_freeb(int argc, char **argv, int sci_idx, void *infop);
-extern void do_setb(int argc, char **argv, int sci_idx, void *infop);
-extern void do_testb(int argc, char **argv, int sci_idx, void *infop);
-extern void do_modify_inode(int argc, char **argv, int sci_idx, void *infop);
-extern void do_list_dir(int argc, char **argv, int sci_idx, void *infop);
-extern void do_change_working_dir(int argc, char **argv, int sci_idx, void *infop);
-extern void do_print_working_directory(int argc, char **argv, int sci_idx, void *infop);
-extern void do_write(int argc, char **argv, int sci_idx, void *infop);
-extern void do_mknod(int argc, char **argv, int sci_idx, void *infop);
-extern void do_mkdir(int argc, char **argv, int sci_idx, void *infop);
-extern void do_rmdir(int argc, char **argv, int sci_idx, void *infop);
-extern void do_show_debugfs_params(int argc, char **argv, int sci_idx, void *infop);
-extern void do_expand_dir(int argc, char **argv, int sci_idx, void *infop);
-extern void do_features(int argc, char **argv, int sci_idx, void *infop);
-extern void do_bmap(int argc, char **argv, int sci_idx, void *infop);
-extern void do_imap(int argc, char **argv, int sci_idx, void *infop);
-extern void do_idump(int argc, char *argv[], int sci_idx, void *infop);
-extern void do_set_current_time(int argc, char **argv, int sci_idx, void *infop);
-extern void do_supported_features(int argc, char **argv, int sci_idx, void *infop);
-extern void do_punch(int argc, char **argv, int sci_idx, void *infop);
-extern void do_fallocate(int argc, char **argv, int sci_idx, void *infop);
-extern void do_symlink(int argc, char **argv, int sci_idx, void *infop);
-
-extern void do_dump_mmp(int argc, char **argv, int sci_idx, void *infop);
-extern void do_set_mmp_value(int argc, char **argv, int sci_idx, void *infop);
-
-extern void do_freefrag(int argc, char **argv, int sci_idx, void *infop);
-extern void do_filefrag(int argc, char *argv[], int sci_idx, void *infop);
+extern void do_dirty_filesys(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_open_filesys(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_close_filesys(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_lcd(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_init_filesys(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_show_super_stats(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_kill_file(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_rm(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_link(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_undel(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_unlink(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_copy_inode(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_find_free_block(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_find_free_inode(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_stat(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_dump_extents(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_blocks(int argc, ss_argv_t argv, int sci_idx, void *infop);
+
+extern void do_chroot(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_clri(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_freei(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_seti(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_testi(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_freeb(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_setb(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_testb(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_modify_inode(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_list_dir(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_change_working_dir(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_print_working_directory(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_write(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_mknod(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_mkdir(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_rmdir(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_show_debugfs_params(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_expand_dir(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_features(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_bmap(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_imap(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_idump(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_set_current_time(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_supported_features(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_punch(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_fallocate(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_symlink(int argc, ss_argv_t argv, int sci_idx, void *infop);
+
+extern void do_dump_mmp(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_set_mmp_value(int argc, ss_argv_t argv, int sci_idx, void *infop);
+
+extern void do_freefrag(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_filefrag(int argc, ss_argv_t argv, int sci_idx, void *infop);
/* do_journal.c */
-extern void do_journal_write(int argc, char *argv[], int sci_idx, void *infop);
-extern void do_journal_open(int argc, char *argv[], int sci_idx, void *infop);
-extern void do_journal_close(int argc, char *argv[], int sci_idx, void *infop);
-extern void do_journal_run(int argc, char *argv[], int sci_idx, void *infop);
+extern void do_journal_write(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_journal_open(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_journal_close(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_journal_run(int argc, ss_argv_t argv, int sci_idx, void *infop);
/* quota.c */
-extern void do_list_quota(int argc, char *argv[], int sci_idx, void *infop);
-extern void do_get_quota(int argc, char *argv[], int sci_idx, void *infop);
+extern void do_list_quota(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_get_quota(int argc, ss_argv_t argv, int sci_idx, void *infop);
/* util.c */
extern __s64 string_to_time(const char *arg);
@@ -198,13 +197,13 @@ extern void do_byte_hexdump(FILE *fp, unsigned char *buf, size_t bufsize);
/* xattrs.c */
void dump_inode_attributes(FILE *out, ext2_ino_t ino);
-void do_get_xattr(int argc, char **argv, int sci_idx, void *infop);
-void do_set_xattr(int argc, char **argv, int sci_idx, void *infop);
-void do_rm_xattr(int argc, char **argv, int sci_idx, void *infop);
-void do_list_xattr(int argc, char **argv, int sci_idx, void *infop);
+void do_get_xattr(int argc, ss_argv_t argv, int sci_idx, void *infop);
+void do_set_xattr(int argc, ss_argv_t argv, int sci_idx, void *infop);
+void do_rm_xattr(int argc, ss_argv_t argv, int sci_idx, void *infop);
+void do_list_xattr(int argc, ss_argv_t argv, int sci_idx, void *infop);
void raw_inode_xattr_dump(FILE *f, unsigned char *buf, unsigned int len);
void block_xattr_dump(FILE *f, unsigned char *buf, unsigned int len);
/* zap.c */
-extern void do_zap_block(int argc, char **argv, int sci_idx, void *infop);
-extern void do_block_dump(int argc, char **argv, int sci_idx, void *infop);
+extern void do_zap_block(int argc, ss_argv_t argv, int sci_idx, void *infop);
+extern void do_block_dump(int argc, ss_argv_t argv, int sci_idx, void *infop);