s3: Remove a typedef (struct file_info)
authorVolker Lendecke <vl@samba.org>
Tue, 27 Jul 2010 08:59:55 +0000 (10:59 +0200)
committerVolker Lendecke <vl@samba.org>
Tue, 27 Jul 2010 19:05:35 +0000 (21:05 +0200)
12 files changed:
source3/client/client.c
source3/client/client_proto.h
source3/client/clitar.c
source3/include/client.h
source3/include/proto.h
source3/libgpo/gpo_filesync.c
source3/libsmb/clilist.c
source3/libsmb/libsmb_dir.c
source3/torture/masktest.c
source3/torture/nbio.c
source3/torture/torture.c
source3/utils/net_rpc.c

index cd41699da31b6923571253667259a96873388a9f..6afdde0ebb3bfe096072857764a4a856466d4287 100644 (file)
@@ -484,7 +484,7 @@ static int cmd_cd_oneup(void)
  Decide if a file should be operated on.
 ********************************************************************/
 
-static bool do_this_one(file_info *finfo)
+static bool do_this_one(struct file_info *finfo)
 {
        if (!finfo->name) {
                return false;
@@ -517,7 +517,7 @@ static bool do_this_one(file_info *finfo)
  Display info about a file.
 ****************************************************************************/
 
-static void display_finfo(file_info *finfo, const char *dir)
+static void display_finfo(struct file_info *finfo, const char *dir)
 {
        time_t t;
        TALLOC_CTX *ctx = talloc_tos();
@@ -581,7 +581,7 @@ static void display_finfo(file_info *finfo, const char *dir)
  Accumulate size of a file.
 ****************************************************************************/
 
-static void do_du(file_info *finfo, const char *dir)
+static void do_du(struct file_info *finfo, const char *dir)
 {
        if (do_this_one(finfo)) {
                dir_total += finfo->size;
@@ -594,7 +594,7 @@ static char *do_list_queue = 0;
 static long do_list_queue_size = 0;
 static long do_list_queue_start = 0;
 static long do_list_queue_end = 0;
-static void (*do_list_fn)(file_info *, const char *dir);
+static void (*do_list_fn)(struct file_info *, const char *dir);
 
 /****************************************************************************
  Functions for do_list_queue.
@@ -711,7 +711,8 @@ static int do_list_queue_empty(void)
  A helper for do_list.
 ****************************************************************************/
 
-static void do_list_helper(const char *mntpoint, file_info *f, const char *mask, void *state)
+static void do_list_helper(const char *mntpoint, struct file_info *f,
+                          const char *mask, void *state)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *dir = NULL;
@@ -784,7 +785,7 @@ static void do_list_helper(const char *mntpoint, file_info *f, const char *mask,
 
 void do_list(const char *mask,
                        uint16 attribute,
-                       void (*fn)(file_info *, const char *dir),
+                       void (*fn)(struct file_info *, const char *dir),
                        bool rec,
                        bool dirs)
 {
@@ -1153,7 +1154,7 @@ static int cmd_get(void)
  Do an mget operation on one file.
 ****************************************************************************/
 
-static void do_mget(file_info *finfo, const char *dir)
+static void do_mget(struct file_info *finfo, const char *dir)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *rname = NULL;
@@ -2132,7 +2133,7 @@ static int cmd_queue(void)
  Delete some files.
 ****************************************************************************/
 
-static void do_del(file_info *finfo, const char *dir)
+static void do_del(struct file_info *finfo, const char *dir)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *mask = NULL;
@@ -4202,7 +4203,7 @@ struct completion_remote {
 };
 
 static void completion_remote_filter(const char *mnt,
-                               file_info *f,
+                               struct file_info *f,
                                const char *mask,
                                void *state)
 {
index aa3eb0e8af44fd7bd951b95bb4bc510cd90ace5f..aca0a8d20da142f0b14264dcf132b4487e557089 100644 (file)
@@ -30,7 +30,7 @@ const char *client_get_cur_dir(void);
 const char *client_set_cur_dir(const char *newdir);
 void do_list(const char *mask,
                        uint16 attribute,
-                       void (*fn)(file_info *, const char *dir),
+                       void (*fn)(struct file_info *, const char *dir),
                        bool rec,
                        bool dirs);
 int cmd_iosize(void);
index 0a1adb463e56e6e3190b844001e074caff06e761..030362f14dff63d47328b494338befeb12c6563f 100644 (file)
@@ -114,8 +114,9 @@ static int tarhandle;
 
 static void writetarheader(int f,  const char *aname, uint64_t size, time_t mtime,
                           const char *amode, unsigned char ftype);
-static void do_atar(const char *rname_in,char *lname,file_info *finfo1);
-static void do_tar(file_info *finfo, const char *dir);
+static void do_atar(const char *rname_in, char *lname,
+                   struct file_info *finfo1);
+static void do_tar(struct file_info *finfo, const char *dir);
 static void oct_it(uint64_t value, int ndgs, char *p);
 static void fixtarname(char *tptr, const char *fp, size_t l);
 static int dotarbuf(int f, char *b, int n);
@@ -613,7 +614,8 @@ static void do_setrattr(char *name, uint16 attr, int set)
 append one remote file to the tar file
 ***************************************************************************/
 
-static void do_atar(const char *rname_in,char *lname,file_info *finfo1)
+static void do_atar(const char *rname_in, char *lname,
+                   struct file_info *finfo1)
 {
        uint16_t fnum = (uint16_t)-1;
        uint64_t nread=0;
@@ -803,7 +805,7 @@ static void do_atar(const char *rname_in,char *lname,file_info *finfo1)
 Append single file to tar file (or not)
 ***************************************************************************/
 
-static void do_tar(file_info *finfo, const char *dir)
+static void do_tar(struct file_info *finfo, const char *dir)
 {
        TALLOC_CTX *ctx = talloc_stackframe();
 
index d2afecf0546061ab7520b41310f476decff29111..861ae5aace4739267ee4d9fcdfbe12c8074a413f 100644 (file)
@@ -279,7 +279,7 @@ struct cli_state {
        struct tevent_req **pending;
 };
 
-typedef struct file_info {
+struct file_info {
        struct cli_state *cli;
        uint64_t size;
        uint16 mode;
@@ -291,7 +291,7 @@ typedef struct file_info {
        struct timespec ctime_ts;
        char *name;
        char short_name[13*3]; /* the *3 is to cope with multi-byte */
-} file_info;
+};
 
 #define CLI_FULL_CONNECTION_DONT_SPNEGO 0x0001
 #define CLI_FULL_CONNECTION_USE_KERBEROS 0x0002
index 8dbe758e20cad733039524e10594424162fae551..a9f77541ec4bcb9c51e5aea513a8905e8b909631 100644 (file)
@@ -2580,11 +2580,14 @@ bool unwrap_pac(TALLOC_CTX *mem_ctx, DATA_BLOB *auth_data, DATA_BLOB *unwrapped_
 /* The following definitions come from libsmb/clilist.c  */
 
 int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute,
-                void (*fn)(const char *, file_info *, const char *, void *), void *state);
+                void (*fn)(const char *, struct file_info *, const char *,
+                           void *), void *state);
 int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute,
-                void (*fn)(const char *, file_info *, const char *, void *), void *state);
+                void (*fn)(const char *, struct file_info *, const char *,
+                           void *), void *state);
 int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute,
-            void (*fn)(const char *, file_info *, const char *, void *), void *state);
+            void (*fn)(const char *, struct file_info *, const char *,
+                       void *), void *state);
 
 /* The following definitions come from libsmb/climessage.c  */
 
index a3002fe860667b3c8c7468a5700d1c438006b47d..461ebb742feac25141893237f07f0be152d55a18 100644 (file)
@@ -31,7 +31,7 @@ struct sync_context {
 };
 
 static void gpo_sync_func(const char *mnt,
-                         file_info *info,
+                         struct file_info *info,
                          const char *mask,
                          void *state);
 
@@ -130,7 +130,7 @@ static bool gpo_sync_files(struct sync_context *ctx)
 ****************************************************************/
 
 static void gpo_sync_func(const char *mnt,
-                         file_info *info,
+                         struct file_info *info,
                          const char *mask,
                          void *state)
 {
index 93f67c7e63df89530eaaca5e36ee1f207dc2e7f1..3af1b0dcc06379f85e05a034c638b001aec80474 100644 (file)
@@ -48,7 +48,7 @@ static size_t interpret_long_filename(TALLOC_CTX *ctx,
                                        int level,
                                        const char *p,
                                        const char *pdata_end,
-                                       file_info *finfo,
+                                       struct file_info *finfo,
                                        uint32 *p_resume_key,
                                        DATA_BLOB *p_last_name_raw)
 {
@@ -221,7 +221,8 @@ static size_t interpret_long_filename(TALLOC_CTX *ctx,
 ****************************************************************************/
 
 int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute,
-                void (*fn)(const char *, file_info *, const char *, void *), void *state)
+                void (*fn)(const char *, struct file_info *, const char *,
+                           void *), void *state)
 {
 #if 1
        int max_matches = 1366; /* Match W2k - was 512. */
@@ -231,7 +232,7 @@ int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute,
        int info_level;
        char *p, *p2, *rdata_end;
        char *mask = NULL;
-       file_info finfo;
+       struct file_info finfo;
        int i;
        char *dirlist = NULL;
        int dirlist_len = 0;
@@ -502,7 +503,7 @@ int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute,
 static bool interpret_short_filename(TALLOC_CTX *ctx,
                                struct cli_state *cli,
                                char *p,
-                               file_info *finfo)
+                               struct file_info *finfo)
 {
        size_t ret;
        ZERO_STRUCTP(finfo);
@@ -541,7 +542,8 @@ static bool interpret_short_filename(TALLOC_CTX *ctx,
 ****************************************************************************/
 
 int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute,
-                void (*fn)(const char *, file_info *, const char *, void *), void *state)
+                void (*fn)(const char *, struct file_info *, const char *,
+                           void *), void *state)
 {
        char *p;
        int received = 0;
@@ -658,7 +660,7 @@ int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute,
 
        frame = talloc_stackframe();
        for (p=dirlist,i=0;i<num_received;i++) {
-               file_info finfo;
+               struct file_info finfo;
                if (!interpret_short_filename(frame, cli, p, &finfo)) {
                        break;
                }
@@ -678,7 +680,8 @@ int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute,
 ****************************************************************************/
 
 int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute,
-            void (*fn)(const char *, file_info *, const char *, void *), void *state)
+            void (*fn)(const char *, struct file_info *, const char *,
+                       void *), void *state)
 {
        if (cli->protocol <= PROTOCOL_LANMAN1)
                return cli_list_old(cli, Mask, attribute, fn, state);
index de637a80e8f74b45575bef11bd4f540886575ded..1a1ca68a8a6734795660eda1381c771a9108794c 100644 (file)
@@ -235,7 +235,7 @@ list_fn(const char *name,
 
 static void
 dir_list_fn(const char *mnt,
-            file_info *finfo,
+            struct file_info *finfo,
             const char *mask,
             void *state)
 {
@@ -1204,7 +1204,7 @@ SMBC_mkdir_ctx(SMBCCTX *context,
 
 static void
 rmdir_list_fn(const char *mnt,
-              file_info *finfo,
+              struct file_info *finfo,
               const char *mask,
               void *state)
 {
index 768323b9f73d27a0cc3eb6bbb7f1a40398c2687a..83b70c25f8118aafe3ae5a804f8240b3516506b0 100644 (file)
@@ -263,9 +263,10 @@ static struct cli_state *connect_one(char *share)
 }
 
 static char *resultp;
-static file_info *f_info;
+static struct file_info *f_info;
 
-static void listfn(const char *mnt, file_info *f, const char *s, void *state)
+static void listfn(const char *mnt, struct file_info *f, const char *s,
+                  void *state)
 {
        if (strcmp(f->name,".") == 0) {
                resultp[0] = '+';
index f69e4c3a2b470288b2993f3c3a7c7cac643aee91..db24f10cc59502dcb657bb43cbb4de93fb1db0b2 100644 (file)
@@ -262,7 +262,8 @@ void nb_qfsinfo(int level)
        cli_dskattr(c, &bsize, &total, &avail);
 }
 
-static void find_fn(const char *mnt, file_info *finfo, const char *name, void *state)
+static void find_fn(const char *mnt, struct file_info *finfo, const char *name,
+                   void *state)
 {
        /* noop */
 }
@@ -281,7 +282,8 @@ void nb_flush(int fnum)
 
 static int total_deleted;
 
-static void delete_fn(const char *mnt, file_info *finfo, const char *name, void *state)
+static void delete_fn(const char *mnt, struct file_info *finfo,
+                     const char *name, void *state)
 {
        char *s, *n;
        if (finfo->name[0] == '.') return;
index 79128cf4a6da33cae7484a9273210daa69d4d031..df8adbdfdf4f8277c6d3cbe7c4423128d6775dff 100644 (file)
@@ -4791,7 +4791,8 @@ static bool run_openattrtest(int dummy)
        return correct;
 }
 
-static void list_fn(const char *mnt, file_info *finfo, const char *name, void *state)
+static void list_fn(const char *mnt, struct file_info *finfo,
+                   const char *name, void *state)
 {
 
 }
@@ -4850,7 +4851,8 @@ static bool run_dirtest(int dummy)
        return correct;
 }
 
-static void del_fn(const char *mnt, file_info *finfo, const char *mask, void *state)
+static void del_fn(const char *mnt, struct file_info *finfo, const char *mask,
+                  void *state)
 {
        struct cli_state *pcli = (struct cli_state *)state;
        fstring fname;
@@ -6151,7 +6153,8 @@ static bool run_uid_regression_test(int dummy)
 static const char *illegal_chars = "*\\/?<>|\":";
 static char force_shortname_chars[] = " +,.[];=\177";
 
-static void shortname_del_fn(const char *mnt, file_info *finfo, const char *mask, void *state)
+static void shortname_del_fn(const char *mnt, struct file_info *finfo,
+                            const char *mask, void *state)
 {
        struct cli_state *pcli = (struct cli_state *)state;
        fstring fname;
@@ -6174,7 +6177,8 @@ struct sn_state {
        bool val;
 };
 
-static void shortname_list_fn(const char *mnt, file_info *finfo, const char *name, void *state)
+static void shortname_list_fn(const char *mnt, struct file_info *finfo,
+                             const char *name, void *state)
 {
        struct sn_state *s = (struct sn_state  *)state;
        int i = s->i;
index 8e2cbd1b2e0a09ab7554728886dacdce41beffbb..cafab87a963dc7f92c87ddfed1747de16b49be32 100644 (file)
@@ -3343,7 +3343,7 @@ static int rpc_share_migrate_shares(struct net_context *c, int argc,
  * @param state        arg-pointer
  *
  **/
-static void copy_fn(const char *mnt, file_info *f,
+static void copy_fn(const char *mnt, struct file_info *f,
                    const char *mask, void *state)
 {
        static NTSTATUS nt_status;