[PATCH] fs/ncpfs/: remove unused #ifdef USE_OLD_SLOW_DIRECTORY_LISTING code
authorAdrian Bunk <bunk@stusta.de>
Sat, 25 Jun 2005 21:59:07 +0000 (14:59 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 25 Jun 2005 23:25:04 +0000 (16:25 -0700)
This patch removes some unused #ifdef USE_OLD_SLOW_DIRECTORY_LISTING
code.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/ncpfs/dir.c
fs/ncpfs/ncplib_kernel.c
fs/ncpfs/ncplib_kernel.h

index 2dc2d8693968e7d223e96cfc8c4aa4aac27d20d6..a9f7a8ab1d595d30fcb656eea4a1349a7f324d43 100644 (file)
@@ -705,18 +705,6 @@ ncp_do_readdir(struct file *filp, void *dirent, filldir_t filldir,
                DPRINTK("ncp_do_readdir: init failed, err=%d\n", err);
                return;
        }
-#ifdef USE_OLD_SLOW_DIRECTORY_LISTING
-       for (;;) {
-               err = ncp_search_for_file_or_subdir(server, &seq, &entry.i);
-               if (err) {
-                       DPRINTK("ncp_do_readdir: search failed, err=%d\n", err);
-                       break;
-               }
-               entry.volume = entry.i.volNumber;
-               if (!ncp_fill_cache(filp, dirent, filldir, ctl, &entry))
-                       break;
-       }
-#else
        /* We MUST NOT use server->buffer_size handshaked with server if we are
           using UDP, as for UDP server uses max. buffer size determined by
           MTU, and for TCP server uses hardwired value 65KB (== 66560 bytes). 
@@ -754,7 +742,6 @@ ncp_do_readdir(struct file *filp, void *dirent, filldir_t filldir,
                }
        } while (more);
        vfree(buf);
-#endif
        return;
 }
 
index e4eb5ed4bee45636c6a2abd4307dbfd804bc15c1..c755e1848a42366d0a08d4e379680b3fc2665a86 100644 (file)
@@ -845,46 +845,6 @@ out:
        return result;
 }
 
-/* Search for everything */
-int ncp_search_for_file_or_subdir(struct ncp_server *server,
-                                 struct nw_search_sequence *seq,
-                                 struct nw_info_struct *target)
-{
-       int result;
-
-       ncp_init_request(server);
-       ncp_add_byte(server, 3);        /* subfunction */
-       ncp_add_byte(server, server->name_space[seq->volNumber]);
-       ncp_add_byte(server, 0);        /* data stream (???) */
-       ncp_add_word(server, cpu_to_le16(0x8006));      /* Search attribs */
-       ncp_add_dword(server, RIM_ALL);         /* return info mask */
-       ncp_add_mem(server, seq, 9);
-#ifdef CONFIG_NCPFS_NFS_NS
-       if (server->name_space[seq->volNumber] == NW_NS_NFS) {
-               ncp_add_byte(server, 0);        /* 0 byte pattern */
-       } else 
-#endif
-       {
-               ncp_add_byte(server, 2);        /* 2 byte pattern */
-               ncp_add_byte(server, 0xff);     /* following is a wildcard */
-               ncp_add_byte(server, '*');
-       }
-       
-       if ((result = ncp_request(server, 87)) != 0)
-               goto out;
-       memcpy(seq, ncp_reply_data(server, 0), sizeof(*seq));
-       ncp_extract_file_info(ncp_reply_data(server, 10), target);
-
-       ncp_unlock_server(server);
-       
-       result = ncp_obtain_nfs_info(server, target);
-       return result;
-
-out:
-       ncp_unlock_server(server);
-       return result;
-}
-
 int ncp_search_for_fileset(struct ncp_server *server,
                           struct nw_search_sequence *seq,
                           int* more,
index 05ec2e9d90c626e5d61e1d39f81f04f37677f196..9e4dc30c2435c207ddce4d2c67311db24429d457 100644 (file)
@@ -87,9 +87,6 @@ int ncp_open_create_file_or_subdir(struct ncp_server *, struct inode *, char *,
 
 int ncp_initialize_search(struct ncp_server *, struct inode *,
                      struct nw_search_sequence *target);
-int ncp_search_for_file_or_subdir(struct ncp_server *server,
-                             struct nw_search_sequence *seq,
-                             struct nw_info_struct *target);
 int ncp_search_for_fileset(struct ncp_server *server,
                           struct nw_search_sequence *seq,
                           int* more, int* cnt,