blob: 2e0610001b6ed3ec1877defd1d56b887b26a0944 [file] [log] [blame]
Theodore Ts'o3839e651997-04-26 13:21:57 +00001/*
2 * Various minor routines...
3 *
4 * Copyright 1987, 1988, 1989 by MIT
5 *
Theodore Ts'o06cefee1999-10-23 01:16:22 +00006 * 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.
Theodore Ts'o3839e651997-04-26 13:21:57 +000014 */
15
Theodore Ts'o3839e651997-04-26 13:21:57 +000016#include <stdio.h>
17#include "ss_internal.h"
18
Theodore Ts'o1e3472c1997-04-29 14:53:37 +000019#define DECLARE(name) void name(int argc,const char * const *argv, \
20 int sci_idx, void *infop)
Theodore Ts'oefc6f622008-08-27 23:07:54 -040021
Theodore Ts'o3839e651997-04-26 13:21:57 +000022/*
23 * ss_self_identify -- assigned by default to the "." request
24 */
Theodore Ts'o54434922003-12-07 01:28:50 -050025void ss_self_identify(int argc __SS_ATTR((unused)),
26 const char * const *argv __SS_ATTR((unused)),
27 int sci_idx, void *infop __SS_ATTR((unused)))
Theodore Ts'o3839e651997-04-26 13:21:57 +000028{
29 register ss_data *info = ss_info(sci_idx);
30 printf("%s version %s\n", info->subsystem_name,
31 info->subsystem_version);
32}
33
34/*
35 * ss_subsystem_name -- print name of subsystem
36 */
Theodore Ts'o54434922003-12-07 01:28:50 -050037void ss_subsystem_name(int argc __SS_ATTR((unused)),
38 const char * const *argv __SS_ATTR((unused)),
Theodore Ts'oefc6f622008-08-27 23:07:54 -040039 int sci_idx,
Theodore Ts'o54434922003-12-07 01:28:50 -050040 void *infop __SS_ATTR((unused)))
Theodore Ts'o3839e651997-04-26 13:21:57 +000041{
42 printf("%s\n", ss_info(sci_idx)->subsystem_name);
43}
44
45/*
46 * ss_subsystem_version -- print version of subsystem
47 */
Theodore Ts'o54434922003-12-07 01:28:50 -050048void ss_subsystem_version(int argc __SS_ATTR((unused)),
49 const char * const *argv __SS_ATTR((unused)),
Theodore Ts'oefc6f622008-08-27 23:07:54 -040050 int sci_idx,
Theodore Ts'o54434922003-12-07 01:28:50 -050051 void *infop __SS_ATTR((unused)))
Theodore Ts'o3839e651997-04-26 13:21:57 +000052{
53 printf("%s\n", ss_info(sci_idx)->subsystem_version);
54}
55
56/*
57 * ss_unimplemented -- routine not implemented (should be
58 * set up as (dont_list,dont_summarize))
59 */
Theodore Ts'o54434922003-12-07 01:28:50 -050060void ss_unimplemented(int argc __SS_ATTR((unused)),
61 const char * const *argv __SS_ATTR((unused)),
62 int sci_idx, void *infop __SS_ATTR((unused)))
Theodore Ts'o3839e651997-04-26 13:21:57 +000063{
64 ss_perror(sci_idx, SS_ET_UNIMPLEMENTED, "");
65}