Beispiel #1
0
/* Global options.  These defaults are the standard ones, I think...   */
int wait_for_reader = 1, wait_for_writer = 1;
int one_reader = 1;

/* What kinds of pipes we use.  */
struct pipe_class *fifo_pipe_class;

/* The current fifo that new opens will see, or NULL if there is none.  */
struct pipe *active_fifo = NULL;

/* Lock this when changing ACTIVE_FIFO.  */
struct mutex active_fifo_lock;
/* Signal this when ACTIVE_FIFO may have changed.  */
struct condition active_fifo_changed;

const char *argp_program_version = STANDARD_HURD_VERSION (fifo);

static struct argp_option options[] =
{
    { "multiple-readers", 'm', 0, 0, "Allow multiple simultaneous readers" },
    { "noblock",          'n', 0, 0, "Don't block on open" },
    { "dgram",            'd', 0, 0, "Reads reflect write record boundaries" },
    { 0 }
};

static error_t
parse_opt (int key, char *arg, struct argp_state *state)
{
    switch (key)
    {
    case 'm':
    return 0;
}

kern_return_t
trivfs_S_io_clear_some_openmodes (struct trivfs_protid *cred,
				  mach_port_t reply,
				  mach_msg_type_name_t replytype,
				  int bits)
{
  if (!cred)
    return EOPNOTSUPP;
  else
    return 0;
}

const char *argp_program_version = STANDARD_HURD_VERSION (proxy-defpager);

static const struct argp argp =
{doc: "\
Access to control interfaces of Mach default pager.\n\
This translator should normally be set on " _SERVERS_DEFPAGER "."};

int
proxy_defpager_demuxer (mach_msg_header_t *inp,
			mach_msg_header_t *outp)
{
  extern int default_pager_server (mach_msg_header_t *, mach_msg_header_t *);

  return default_pager_server (inp, outp)
    || trivfs_demuxer (inp, outp);
}
Beispiel #3
0
#include <hurd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <argp.h>
#include <fcntl.h>
#include <unistd.h>

#include <error.h>
#include <argz.h>
#include <version.h>

#include <hurd/fsys.h>

const char *argp_program_version = STANDARD_HURD_VERSION (fsysopts);

static struct argp_option options[] =
{
  {"dereference", 'L', 0, 0, "If FILESYS is a symbolic link, follow it"},
  {"recursive",   'R', 0, 0, "Pass these options to any child translators"},
  {0, 0, 0, 0}
};
static char *args_doc = "FILESYS [FS_OPTION...]";
static char *doc = "Get or set command line options for running translator FILESYS."
"\vThe legal values for FS_OPTION depends on FILESYS, but\
 some common ones are: --readonly, --writable, --update, --sync[=INTERVAL],\
 and --nosync.\n\nIf no options are supplied, FILESYS's existing options\
 are printed";

/* ---------------------------------------------------------------- */
Beispiel #4
0
  mach_msg_type_name_t requestType;

  err = mach_port_extract_right (extract_target_task,
                                 extract_target_port,
                                 extract_target_type,
                                 &request,
                                 &requestType);
  if (err)
    error (1, err, "mach_port_extract_right");
  if (err)
    return err;
  requestType = MACH_MSG_TYPE_COPY_SEND;
  return setup (request, requestType);
}

const char *argp_program_version = STANDARD_HURD_VERSION (rpcscan);

char **cmd_argv;
int verbose;
int numeric;
int subsystem;

#define OPT_TARGET_TASK		-1
#define OPT_TARGET_THREAD	-2
#define OPT_TARGET_PROC		-3
#define OPT_TARGET_AUTH		-4
#define OPT_TARGET_EXTRACT	-5

static const struct argp_option options[] =
{
  {NULL, 0, NULL, OPTION_DOC, "Target selection", 1},
Beispiel #5
0
#include <error.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/wait.h>

#include <error.h>
#include <argz.h>
#include <hurd/fshelp.h>
#include <hurd/process.h>
#include <version.h>

#include <hurd/lookup.h>
#include <hurd/fsys.h>


const char *argp_program_version = STANDARD_HURD_VERSION (settrans);

#define DEFAULT_TIMEOUT 60

#define _STRINGIFY(arg) #arg
#define STRINGIFY(arg) _STRINGIFY (arg)

#define OPT_CHROOT_CHDIR	-1
#define OPT_STACK		-2

static struct argp_option options[] =
{
  {"active",      'a', 0, 0, "Start TRANSLATOR and set it as NODE's active translator" },
  {"start",       's', 0, 0, "Start the translator specified by the NODE's passive translator record and set it as NODE's active translator" },
  {"passive",     'p', 0, 0, "Change NODE's passive translator record (default)" },
  {"create",      'c', 0, 0, "Create NODE if it doesn't exist" },
Beispiel #6
0
   You should have received a copy of the GNU General Public License along
   with this program; if not, write to the Free Software Foundation, Inc.,
   59 Temple Place - Suite 330, Boston, MA 02111, USA. */

#include <argp.h>
#include <error.h>
#include <unistd.h>
#include <hurd.h>
#include <sys/fcntl.h>
#include <sys/mman.h>

#include <hurd/store.h>
#include <version.h>

const char *argp_program_version = STANDARD_HURD_VERSION (storeread);

struct argp_option options[] = {
  {"file", 'f', 0, 0, "Use file IO instead of the raw device"},
  {"block-size", 'b', "BYTES", 0, "Set the file block size"},
  {0, 0}
};
const char arg_doc[] = "FILE [ADDR [LENGTH]]...";
const char doc[] = "Write portions of the contents of a store to stdout"
"\vADDR is in blocks, and defaults to 0;"
" LENGTH is in bytes, and defaults to the remainder of FILE.";

int
main (int argc, char **argv)
{
  struct store *store = 0;
Beispiel #7
0
#include <stdio.h>
#include <stdlib.h>
#include <error.h>
#include <fcntl.h>
#include <argp.h>

#include <sys/cdefs.h>
#ifndef __XSTRING /* Could / should (?) be provided by glibc.  */
#define __XSTRING(x) __STRING(x) /* Expand x, then stringify.  */
#endif

#include <version.h>

#include "ifsock_S.h"

const char *argp_program_version = STANDARD_HURD_VERSION (ifsock);

static const char doc[] = "A translator to provide Unix domain sockets."
"\vThis translator acts as a hook for Unix domain sockets."
"  The pflocal translator on " _SERVERS_SOCKET "/" __XSTRING(PF_LOCAL)
" implements the sockets.";

mach_port_t address_port;

struct port_class *control_class;
struct port_class *node_class;
struct port_bucket *port_bucket;

int trivfs_fstype = FSTYPE_IFSOCK;
int trivfs_fsid = 0; /* ??? */
Beispiel #8
0
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <argp.h>
#include <error.h>
#include <version.h>
#include "pids.h"
#include <sys/mman.h>

/* From libc (not in hurd.h) */
char *
_hurd_canonicalize_directory_name_internal (file_t thisdir,
                                            char *buf,
                                            size_t size);

const char *argp_program_version = STANDARD_HURD_VERSION (msgport);

static const struct argp_option options[] =
{
  {0, 0}
};

static const char doc[] =
"Send messages to selected processes";

static const char args_doc[] =
"";



/* All command functions match this prototype. */
Beispiel #9
0
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA. */

#include <unistd.h>
#include <argp.h>
#include <argz.h>
#include <error.h>
#include <sys/time.h>
#include <hurd/paths.h>

#include <version.h>

#include "usermux.h"

const char *argp_program_version = STANDARD_HURD_VERSION (usermux);

char *netfs_server_name = "usermux";
char *netfs_server_version = HURD_VERSION;
int netfs_maxsymlinks = 25;

volatile struct mapped_time_value *usermux_mapped_time;

#define OPT_USER_PAT	1
#define OPT_HOME_PAT	2
#define OPT_UID_PAT	3

/* Startup options.  */
static const struct argp_option options[] =
{
  { "user-pattern", OPT_USER_PAT, "PAT", 0,
Beispiel #10
0
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */

#include <errno.h>
#include <argp.h>
#include <hurd.h>
#include <version.h>

#include "fsck.h"

const char *argp_program_version = STANDARD_HURD_VERSION (fsck.ufs);

char *lfname = "lost+found";
mode_t lfmode = 0755;

/* Terse automatic mode for noninteractive use; punts on severe problems.  */
int preen = 0;

/* Total number of files found on the partition.  */
long num_files = 0;

static struct argp_option options[] =
{
  {"preen",      'p', 0,      0,  "Terse automatic mode", 1},
  {"yes",        'y', 0,      0,  "Automatically answer yes to all questions"},
  {"no",         'n', 0,      0,  "Automatically answer no to all questions"},
Beispiel #11
0
int trivfs_fsid;
int trivfs_support_read = 1;
int trivfs_support_write = 1;
int trivfs_support_exec = 0;
int trivfs_allow_open = O_READ | O_WRITE;

/* We have a class each per portclass.  */
struct port_class *pfinet_protid_portclasses[2];
struct port_class *pfinet_cntl_portclasses[2];

/* Which portclass to install on the bootstrap port, default to IPv4. */
int pfinet_bootstrap_portclass = PORTCLASS_INET;

struct port_class *shutdown_notify_class;

const char *argp_program_version = STANDARD_HURD_VERSION (pfinet);

/* Option parser.  */
extern struct argp pfinet_argp;

#include "io_S.h"
#include "socket_S.h"
#include "pfinet_S.h"
#include "iioctl_S.h"
#include "startup_notify_S.h"

int
pfinet_demuxer (mach_msg_header_t *inp,
                mach_msg_header_t *outp)
{
    struct port_info *pi;
Beispiel #12
0
#include <errno.h>
#include <error.h>
#include <version.h>
#include "fsys_S.h"

mach_port_t realnode;

/* We return this for O_NOLINK lookups */
mach_port_t realnodenoauth;

/* We return this for non O_NOLINK lookups */
char *linktarget;

extern int fsys_server (mach_msg_header_t *, mach_msg_header_t *);

const char *argp_program_version = STANDARD_HURD_VERSION (symlink);

static const struct argp_option options[] =
  {
    { 0 }
  };

static const char args_doc[] = "TARGET";
static const char doc[] = "A translator for symlinks."
"\vA symlink is an alias for another node in the filesystem."
"\n"
"\nA symbolic link refers to its target `by name', and contains no actual"
" reference to the target.  The target referenced by the symlink is"
" looked up in the namespace of the client.";

/* Parse a single option/argument.  */