int net_status_usage(struct net_context *c, int argc, const char **argv)
{
- d_printf(" net status sessions [parseable] "
- "Show list of open sessions\n");
- d_printf(" net status shares [parseable] "
- "Show list of open shares\n");
+ d_printf(_(" net status sessions [parseable] "
+ "Show list of open sessions\n"));
+ d_printf(_(" net status shares [parseable] "
+ "Show list of open shares\n"));
return -1;
}
bool parseable;
if (c->display_usage) {
- d_printf("Usage:\n"
- "net status sessions [parseable]\n"
- " Display open user sessions.\n"
- " If parseable is specified, output is machine-"
- "readable.\n");
+ d_printf( "%s\n"
+ "net status sessions [parseable]\n"
+ " %s\n",
+ _("Usage:"),
+ _("Display open user sessions.\n"
+ " If parseable is specified, output is machine-"
+ "readable."));
return 0;
}
}
if (!parseable) {
- d_printf("PID Username Group Machine"
- " \n");
- d_printf("-------------------------------------------"
- "------------------------\n");
+ d_printf(_("PID Username Group Machine"
+ " \n"
+ "-------------------------------------------"
+ "------------------------\n"));
}
db = db_open(NULL, lock_path("sessionid.tdb"), 0,
TDB_CLEAR_IF_FIRST, O_RDONLY, 0644);
if (db == NULL) {
- d_fprintf(stderr, "%s not initialised\n", lock_path("sessionid.tdb"));
+ d_fprintf(stderr, _("%s not initialised\n"),
+ lock_path("sessionid.tdb"));
return -1;
}
return 0;
}
-static int show_share_parseable(struct db_record *rec,
- const struct connections_key *key,
+static int show_share_parseable(const struct connections_key *key,
const struct connections_data *crec,
void *state)
{
db = db_open(NULL, lock_path("sessionid.tdb"), 0,
TDB_CLEAR_IF_FIRST, O_RDONLY, 0644);
if (db == NULL) {
- d_fprintf(stderr, "%s not initialised\n", lock_path("sessionid.tdb"));
+ d_fprintf(stderr, _("%s not initialised\n"),
+ lock_path("sessionid.tdb"));
return -1;
}
db->traverse_read(db, collect_pid, &ids);
TALLOC_FREE(db);
- connections_forall(show_share_parseable, &ids);
+ connections_forall_read(show_share_parseable, &ids);
SAFE_FREE(ids.entries);
static int net_status_shares(struct net_context *c, int argc, const char **argv)
{
if (c->display_usage) {
- d_printf("Usage:\n"
- "net status shares [parseable]\n"
- " Display open user shares.\n"
- " If parseable is specified, output is machine-"
- "readable.\n");
+ d_printf( "%s\n"
+ "net status shares [parseable]\n"
+ " %s\n",
+ _("Usage:"),
+ _("Display open user shares.\n"
+ " If parseable is specified, output is machine-"
+ "readable."));
return 0;
}
if (argc == 0) {
- d_printf("\nService pid machine "
- "Connected at\n");
- d_printf("-------------------------------------"
- "------------------\n");
+ d_printf(_("\nService pid machine "
+ "Connected at\n"
+ "-------------------------------------"
+ "------------------\n"));
connections_forall(show_share, NULL);
"sessions",
net_status_sessions,
NET_TRANSPORT_LOCAL,
- "Show list of open sessions",
- "net status sessions [parseable]\n"
- " If parseable is specified, output is presented "
- "in a machine-parseable fashion."
+ N_("Show list of open sessions"),
+ N_("net status sessions [parseable]\n"
+ " If parseable is specified, output is presented "
+ "in a machine-parseable fashion.")
},
{
"shares",
net_status_shares,
NET_TRANSPORT_LOCAL,
- "Show list of open shares",
- "net status shares [parseable]\n"
- " If parseable is specified, output is presented "
- "in a machine-parseable fashion."
+ N_("Show list of open shares"),
+ N_("net status shares [parseable]\n"
+ " If parseable is specified, output is presented "
+ "in a machine-parseable fashion.")
},
{NULL, NULL, 0, NULL, NULL}
};