1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
/* Copyright (C) 2001-2005 by Hans Reiser, licensing governed by
reiser4progs/COPYING.
busy.h -- reiser4 busybox declarations. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <time.h>
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <misc/misc.h>
#include <reiser4/libreiser4.h>
#define PATH_MAXLEN 4096
typedef struct busy_target {
reiser4_fs_t *fs;
char path[PATH_MAXLEN];
long long int offset;
} busy_target_t;
#define OBJFLAG_CRYCOM (1 << 16)
typedef struct busy_ctx {
int testno;
busy_target_t in;
busy_target_t out;
int objtype;
uint32_t mode;
uint64_t rdev;
int64_t count;
uint32_t blksize;
} busy_ctx_t;
typedef errno_t (*cmd_handler_t) (busy_ctx_t *ctx);
typedef struct busy_cmd {
char *name;
char *options;
cmd_handler_t handler;
int ops_num;
char *info;
} busy_cmd_t;
extern errno_t reg_test(busy_ctx_t *ctx);
extern errno_t read_test(busy_ctx_t *ctx);
extern errno_t sym_test(busy_ctx_t *ctx);
extern errno_t ls_cmd(busy_ctx_t *ctx);
extern errno_t stat_cmd(busy_ctx_t *ctx);
extern errno_t create_cmd(busy_ctx_t *ctx);
extern errno_t ln_cmd(busy_ctx_t *ctx);
extern errno_t rm_cmd(busy_ctx_t *ctx);
extern errno_t cp_cmd(busy_ctx_t *ctx);
extern errno_t trunc_cmd(busy_ctx_t *ctx);
extern reiser4_object_t *busy_misc_open_parent(reiser4_tree_t *tree,
char **path);
|