Deleted Added
full compact
rls.c (1906) rls.c (8875)
1/* @(#)rls.c 2.2 88/08/12 4.0 RPCSRC */
2/*
3 * rls.c: Remote directory listing client
4 */
5#include <stdio.h>
6#include <rpc/rpc.h> /* always need this */
7#include "dir.h" /* need this too: will be generated by rpcgen*/
8
9extern int errno;
10
11main(argc, argv)
12 int argc;
13 char *argv[];
14{
15 CLIENT *cl;
16 char *server;
17 char *dir;
18 readdir_res *result;
19 namelist nl;
1/* @(#)rls.c 2.2 88/08/12 4.0 RPCSRC */
2/*
3 * rls.c: Remote directory listing client
4 */
5#include <stdio.h>
6#include <rpc/rpc.h> /* always need this */
7#include "dir.h" /* need this too: will be generated by rpcgen*/
8
9extern int errno;
10
11main(argc, argv)
12 int argc;
13 char *argv[];
14{
15 CLIENT *cl;
16 char *server;
17 char *dir;
18 readdir_res *result;
19 namelist nl;
20
21
20
21
22 if (argc != 3) {
23 fprintf(stderr, "usage: %s host directory\n", argv[0]);
24 exit(1);
25 }
26
27 /*
28 * Remember what our command line arguments refer to
29 */

--- 9 unchanged lines hidden (view full) ---

39 if (cl == NULL) {
40 /*
41 * Couldn't establish connection with server.
42 * Print error message and die.
43 */
44 clnt_pcreateerror(server);
45 exit(1);
46 }
22 if (argc != 3) {
23 fprintf(stderr, "usage: %s host directory\n", argv[0]);
24 exit(1);
25 }
26
27 /*
28 * Remember what our command line arguments refer to
29 */

--- 9 unchanged lines hidden (view full) ---

39 if (cl == NULL) {
40 /*
41 * Couldn't establish connection with server.
42 * Print error message and die.
43 */
44 clnt_pcreateerror(server);
45 exit(1);
46 }
47
47
48 /*
49 * Call the remote procedure "readdir" on the server
50 */
51 result = readdir_1(&dir, cl);
52 if (result == NULL) {
53 /*
48 /*
49 * Call the remote procedure "readdir" on the server
50 */
51 result = readdir_1(&dir, cl);
52 if (result == NULL) {
53 /*
54 * An error occurred while calling the server.
54 * An error occurred while calling the server.
55 * Print error message and die.
56 */
57 clnt_perror(cl, server);
58 exit(1);
59 }
60
61 /*
62 * Okay, we successfully called the remote procedure.

--- 19 unchanged lines hidden ---
55 * Print error message and die.
56 */
57 clnt_perror(cl, server);
58 exit(1);
59 }
60
61 /*
62 * Okay, we successfully called the remote procedure.

--- 19 unchanged lines hidden ---