Whamcloud - gitweb
libext2fs.texinfo, ChangeLog:
[tools/e2fsprogs.git] / lib / ss / requests.c
1 /*
2  * Various minor routines...
3  *
4  * Copyright 1987, 1988, 1989 by MIT
5  *
6  * Permission to use, copy, modify, and distribute this software and
7  * its documentation for any purpose is hereby granted, provided that
8  * the names of M.I.T. and the M.I.T. S.I.P.B. not be used in
9  * advertising or publicity pertaining to distribution of the software
10  * without specific, written prior permission.  M.I.T. and the
11  * M.I.T. S.I.P.B. make no representations about the suitability of
12  * this software for any purpose.  It is provided "as is" without
13  * express or implied warranty.
14  */
15
16 #include <stdio.h>
17 #include "ss_internal.h"
18
19 #ifdef __STDC__
20 #define DECLARE(name) void name(int argc,const char * const *argv, \
21                                 int sci_idx, void *infop)
22 #else
23 #define DECLARE(name) void name(argc,argv,sci_idx,info)int argc,sci_idx;char **argv;void *infop;
24
25 #endif
26         
27 /*
28  * ss_self_identify -- assigned by default to the "." request
29  */
30 DECLARE(ss_self_identify)
31 {
32      register ss_data *info = ss_info(sci_idx);
33      printf("%s version %s\n", info->subsystem_name,
34             info->subsystem_version);
35 }
36
37 /*
38  * ss_subsystem_name -- print name of subsystem
39  */
40 DECLARE(ss_subsystem_name)
41 {
42      printf("%s\n", ss_info(sci_idx)->subsystem_name);
43 }
44
45 /*
46  * ss_subsystem_version -- print version of subsystem
47  */
48 DECLARE(ss_subsystem_version)
49 {
50      printf("%s\n", ss_info(sci_idx)->subsystem_version);
51 }
52
53 /*
54  * ss_unimplemented -- routine not implemented (should be
55  * set up as (dont_list,dont_summarize))
56  */
57 DECLARE(ss_unimplemented)
58 {
59      ss_perror(sci_idx, SS_ET_UNIMPLEMENTED, "");
60 }