diff options
author | bde <bde@FreeBSD.org> | 1997-07-03 03:28:27 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1997-07-03 03:28:27 +0000 |
commit | c800b77e17a9db61b5cfedb8ada17ba33ba97d40 (patch) | |
tree | 90ddf44d2360a352ad20e3859f2a1e7fb8011ca1 /lib/librpc/demo/msg/msg_proc.c | |
parent | 73643318c3a441ade17ebffbe29ea00889ccbad3 (diff) | |
parent | e2f0a0f35c8c3ecbae359c67f0d5b3aac5ce43dc (diff) | |
download | FreeBSD-src-c800b77e17a9db61b5cfedb8ada17ba33ba97d40.zip FreeBSD-src-c800b77e17a9db61b5cfedb8ada17ba33ba97d40.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r27180,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'lib/librpc/demo/msg/msg_proc.c')
-rw-r--r-- | lib/librpc/demo/msg/msg_proc.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/librpc/demo/msg/msg_proc.c b/lib/librpc/demo/msg/msg_proc.c new file mode 100644 index 0000000..80e5d95 --- /dev/null +++ b/lib/librpc/demo/msg/msg_proc.c @@ -0,0 +1,28 @@ +/* @(#)msg_proc.c 2.1 88/08/11 4.0 RPCSRC */ +/* + * msg_proc.c: implementation of the remote procedure "printmessage" + */ +#include <stdio.h> +#include <rpc/rpc.h> /* always need this here */ +#include "msg.h" /* need this too: msg.h will be generated by rpcgen */ + +/* + * Remote verson of "printmessage" + */ +int * +printmessage_1(msg) + char **msg; +{ + static int result; /* must be static! */ + FILE *f; + + f = fopen("/dev/console", "w"); + if (f == NULL) { + result = 0; + return (&result); + } + fprintf(f, "%s\n", *msg); + fclose(f); + result = 1; + return (&result); +} |