|
nfs-ganesha 1.4
|
#include <strings.h>#include <errno.h>#include <sys/types.h>#include <sys/stat.h>#include <sys/time.h>#include <unistd.h>#include <time.h>#include <ctype.h>#include <string.h>#include <pwd.h>#include "fsal.h"#include "mfsl.h"#include "log.h"#include "err_ghost_fs.h"#include "config_parsing.h"#include "cmd_tools.h"#include "commands.h"#include "Getopt.h"Go to the source code of this file.
Classes | |
| struct | cmdmfsl_thr_info__ |
Defines | |
| #define | READDIR_SIZE FSAL_READDIR_SIZE |
| #define | MAX_GRPS 128 |
| #define | MAX_CAT_SIZE (1024*1024) |
Typedefs | |
| typedef struct cmdmfsl_thr_info__ | cmdmfsl_thr_info_t |
Functions | |
| cmdmfsl_thr_info_t * | GetMFSLCmdContext () |
| int | Init_Thread_MFSL (FILE *output, cmdmfsl_thr_info_t *context, int flag_v) |
| void | mfsl_layer_SetLogLevel (int log_lvl) |
| int | mfsl_init (char *filename, int flag_v, FILE *output) |
| int | fn_mfsl_init (int argc, char **argv, FILE *output) |
| int | fn_mfsl_pwd (int argc, char **argv, FILE *output) |
| int | msfl_solvepath (char *io_global_path, int size_global_path, char *i_spec_path, mfsl_object_t i_current_handle, mfsl_object_t *new_handle, FILE *output) |
| int | fn_mfsl_cd (int argc, char **argv, FILE *output) |
| int | fn_mfsl_stat (int argc, char **argv, FILE *output) |
| int | fn_mfsl_ls (int argc, char **argv, FILE *output) |
| int | fn_mfsl_su (int argc, char **argv, FILE *output) |
| int | fn_mfsl_unlink (int argc, char **argv, FILE *output) |
| int | fn_mfsl_mkdir (int argc, char **argv, FILE *output) |
| int | fn_mfsl_rename (int argc, char **argv, FILE *output) |
| int | fn_mfsl_ln (int argc, char **argv, FILE *output) |
| int | fn_mfsl_hardlink (int argc, char **argv, FILE *output) |
| int | fn_mfsl_create (int argc, char **argv, FILE *output) |
| int | fn_mfsl_setattr (int argc, char **argv, FILE *output) |
| int | fn_mfsl_access (int argc, char **argv, FILE *output) |
| int | fn_mfsl_truncate (int argc, char **argv, FILE *output) |
| int | fn_mfsl_open (int argc, char **argv, FILE *output) |
| int | fn_mfsl_read (int argc, char **argv, FILE *output) |
| int | fn_mfsl_write (int argc, char **argv, FILE *output) |
| int | fn_mfsl_close (int argc, char **argv, FILE *output) |
| int | fn_mfsl_cat (int argc, char **argv, FILE *output) |
| int | fn_mfsl_handlecmp (int argc, char **argv, FILE *output) |
| #define MAX_CAT_SIZE (1024*1024) |
| #define MAX_GRPS 128 |
| #define READDIR_SIZE FSAL_READDIR_SIZE |
| typedef struct cmdmfsl_thr_info__ cmdmfsl_thr_info_t |
| int fn_mfsl_access | ( | int | argc, |
| char ** | argv, | ||
| FILE * | output | ||
| ) |
perform an access command. syntax: access [-A] [F][R][W][X] <file> example: access toto FRX
Definition at line 2541 of file commands_MFSL.c.
| int fn_mfsl_cat | ( | int | argc, |
| char ** | argv, | ||
| FILE * | output | ||
| ) |
Command that prints a file to screen. cat [-f] <path>
Definition at line 4109 of file commands_MFSL.c.
| int fn_mfsl_cd | ( | int | argc, |
| char ** | argv, | ||
| FILE * | output | ||
| ) |
change current path
Definition at line 648 of file commands_MFSL.c.
| int fn_mfsl_close | ( | int | argc, |
| char ** | argv, | ||
| FILE * | output | ||
| ) |
Command that closes a file. close
Definition at line 4044 of file commands_MFSL.c.
| int fn_mfsl_create | ( | int | argc, |
| char ** | argv, | ||
| FILE * | output | ||
| ) |
proceed an create command.
Definition at line 2146 of file commands_MFSL.c.
| int fn_mfsl_handlecmp | ( | int | argc, |
| char ** | argv, | ||
| FILE * | output | ||
| ) |
compare 2 handles.
Definition at line 4280 of file commands_MFSL.c.
| int fn_mfsl_hardlink | ( | int | argc, |
| char ** | argv, | ||
| FILE * | output | ||
| ) |
proceed a hardlink command.
Definition at line 1984 of file commands_MFSL.c.
| int fn_mfsl_init | ( | int | argc, |
| char ** | argv, | ||
| FILE * | output | ||
| ) |
proceed an init_fs command.
Definition at line 357 of file commands_MFSL.c.
| int fn_mfsl_ln | ( | int | argc, |
| char ** | argv, | ||
| FILE * | output | ||
| ) |
proceed an ln command.
Definition at line 1815 of file commands_MFSL.c.
| int fn_mfsl_ls | ( | int | argc, |
| char ** | argv, | ||
| FILE * | output | ||
| ) |
proceed an ls command.
Definition at line 885 of file commands_MFSL.c.
| int fn_mfsl_mkdir | ( | int | argc, |
| char ** | argv, | ||
| FILE * | output | ||
| ) |
proceed an mkdir command.
Definition at line 1449 of file commands_MFSL.c.
| int fn_mfsl_open | ( | int | argc, |
| char ** | argv, | ||
| FILE * | output | ||
| ) |
Command that opens a file using specific flags. open <path> [ rwat ]
Definition at line 2939 of file commands_MFSL.c.
| int fn_mfsl_pwd | ( | int | argc, |
| char ** | argv, | ||
| FILE * | output | ||
| ) |
prints current path
Definition at line 433 of file commands_MFSL.c.
| int fn_mfsl_read | ( | int | argc, |
| char ** | argv, | ||
| FILE * | output | ||
| ) |
Command that reads data from an opened file.
Definition at line 3145 of file commands_MFSL.c.
| int fn_mfsl_rename | ( | int | argc, |
| char ** | argv, | ||
| FILE * | output | ||
| ) |
proceed a rename command.
Definition at line 1636 of file commands_MFSL.c.
| int fn_mfsl_setattr | ( | int | argc, |
| char ** | argv, | ||
| FILE * | output | ||
| ) |
Definition at line 2346 of file commands_MFSL.c.
| int fn_mfsl_stat | ( | int | argc, |
| char ** | argv, | ||
| FILE * | output | ||
| ) |
proceed a stat command.
Definition at line 745 of file commands_MFSL.c.
| int fn_mfsl_su | ( | int | argc, |
| char ** | argv, | ||
| FILE * | output | ||
| ) |
change thread contexte.
Definition at line 1212 of file commands_MFSL.c.
| int fn_mfsl_truncate | ( | int | argc, |
| char ** | argv, | ||
| FILE * | output | ||
| ) |
proceed a truncate command.
Definition at line 2802 of file commands_MFSL.c.
| int fn_mfsl_unlink | ( | int | argc, |
| char ** | argv, | ||
| FILE * | output | ||
| ) |
proceed an unlink command.
Definition at line 1318 of file commands_MFSL.c.
| int fn_mfsl_write | ( | int | argc, |
| char ** | argv, | ||
| FILE * | output | ||
| ) |
Command that writes data to an opened file.
Usage: write [-h][-v] [ -s <seek_type>,<offset> ] [-N <nb_times>] -A <ascii_string> write [-h][-v] [ -s <seek_type>,<offset> ] [-N <nb_times>] -X <hexa_data> Where: <seek_type> can be: SET, CUR, END <offset> is a signed number of bytes. <nb_times> is the number of times we write the expression into the file.
<ascii_string> is a string to be written to file. Note that the null terminating character of is also written to file. or <hexa_data> is a data represented in hexadecimal format, that is to be written to file.
Examples:
For writing 10 times the null terminated string "hello world" at the end of the file: write -s END,0 -N 10 -A "hello world"
For overwriting the beginning of the file with the pattern 0xA1267AEF31254ADE repeated twice: write -s SET,0 -N 2 -X "A1267AEF31254ADE"
Definition at line 3595 of file commands_MFSL.c.
| cmdmfsl_thr_info_t* GetMFSLCmdContext | ( | ) |
GetMFSLCmdContext : manages pthread_keys.
Definition at line 102 of file commands_MFSL.c.
| int Init_Thread_MFSL | ( | FILE * | output, |
| cmdmfsl_thr_info_t * | context, | ||
| int | flag_v | ||
| ) |
Initialize thread specific FSAL environment.
Definition at line 152 of file commands_MFSL.c.
| int mfsl_init | ( | char * | filename, |
| int | flag_v, | ||
| FILE * | output | ||
| ) |
Definition at line 263 of file commands_MFSL.c.
| void mfsl_layer_SetLogLevel | ( | int | log_lvl | ) |
Definition at line 246 of file commands_MFSL.c.
| int msfl_solvepath | ( | char * | io_global_path, |
| int | size_global_path, | ||
| char * | i_spec_path, | ||
| mfsl_object_t | i_current_handle, | ||
| mfsl_object_t * | new_handle, | ||
| FILE * | output | ||
| ) |
Definition at line 474 of file commands_MFSL.c.
1.7.3