]> git.ipfire.org Git - thirdparty/e2fsprogs.git/blame - lib/ss/requests.c
Change compile_et to generate header files that use <et/com_err.h>
[thirdparty/e2fsprogs.git] / lib / ss / requests.c
CommitLineData
3839e657
TT
1/*
2 * Various minor routines...
3 *
4 * Copyright 1987, 1988, 1989 by MIT
5 *
06cefee5
TT
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.
3839e657
TT
14 */
15
3839e657
TT
16#include <stdio.h>
17#include "ss_internal.h"
18
1e3472c5
TT
19#define DECLARE(name) void name(int argc,const char * const *argv, \
20 int sci_idx, void *infop)
f3db3566 21
3839e657
TT
22/*
23 * ss_self_identify -- assigned by default to the "." request
24 */
91835c15
TT
25void ss_self_identify(int argc,const char * const *argv,
26 int sci_idx, void *infop)
3839e657
TT
27{
28 register ss_data *info = ss_info(sci_idx);
29 printf("%s version %s\n", info->subsystem_name,
30 info->subsystem_version);
31}
32
33/*
34 * ss_subsystem_name -- print name of subsystem
35 */
91835c15
TT
36void ss_subsystem_name(int argc,const char * const *argv,
37 int sci_idx, void *infop)
3839e657
TT
38{
39 printf("%s\n", ss_info(sci_idx)->subsystem_name);
40}
41
42/*
43 * ss_subsystem_version -- print version of subsystem
44 */
91835c15
TT
45void ss_subsystem_version(int argc,const char * const *argv,
46 int sci_idx, void *infop)
3839e657
TT
47{
48 printf("%s\n", ss_info(sci_idx)->subsystem_version);
49}
50
51/*
52 * ss_unimplemented -- routine not implemented (should be
53 * set up as (dont_list,dont_summarize))
54 */
91835c15
TT
55void ss_unimplemented(int argc,const char * const *argv,
56 int sci_idx, void *infop)
3839e657
TT
57{
58 ss_perror(sci_idx, SS_ET_UNIMPLEMENTED, "");
59}