Skip to content

Commit 8cfe493

Browse files
committed
Rename "struct slash" with typedef slash_t
1 parent 6dc7d67 commit 8cfe493

File tree

8 files changed

+38
-38
lines changed

8 files changed

+38
-38
lines changed

src/objstore/objstore_slash.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include <param/param_scheduler.h>
2424

2525
#if 0
26-
static int cmd_schedule_push(struct slash *slash) {
26+
static int cmd_schedule_push(slash_t *slash) {
2727
unsigned int server = 0;
2828
unsigned int time = 0;
2929
unsigned int host = 0;
@@ -73,7 +73,7 @@ static int objstore_scan_callback(vmem_t * vmem, int offset, int verbose, void *
7373

7474
}
7575

76-
static int cmd_objstore_scan(struct slash *slash) {
76+
static int cmd_objstore_scan(slash_t *slash) {
7777
if (slash->argc >= 1)
7878
return SLASH_EUSAGE;
7979

@@ -84,7 +84,7 @@ static int cmd_objstore_scan(struct slash *slash) {
8484
slash_command_sub(objstore, scan, cmd_objstore_scan, "", NULL);
8585

8686

87-
static int cmd_objstore_rm_obj(struct slash *slash) {
87+
static int cmd_objstore_rm_obj(slash_t *slash) {
8888
int offset = 0;
8989

9090
if (slash->argc < 1)

src/param/commands/param_commands_slash.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include "../param_slash.h"
2828

2929

30-
static int cmd_server_upload(struct slash *slash) {
30+
static int cmd_server_upload(slash_t *slash) {
3131

3232
unsigned int timeout = slash_dfl_timeout;
3333
unsigned int server = slash_dfl_node;
@@ -63,7 +63,7 @@ static int cmd_server_upload(struct slash *slash) {
6363
}
6464
slash_command_subsub(cmd, server, upload, cmd_server_upload, "", NULL);
6565

66-
static int cmd_server_download(struct slash *slash) {
66+
static int cmd_server_download(slash_t *slash) {
6767

6868
unsigned int timeout = slash_dfl_timeout;
6969
unsigned int server = slash_dfl_node;
@@ -99,7 +99,7 @@ static int cmd_server_download(struct slash *slash) {
9999
}
100100
slash_command_subsub(cmd, server, download, cmd_server_download, "<name>", NULL);
101101

102-
static int cmd_server_list(struct slash *slash) {
102+
static int cmd_server_list(slash_t *slash) {
103103

104104
unsigned int timeout = slash_dfl_timeout;
105105
unsigned int server = slash_dfl_node;
@@ -126,7 +126,7 @@ unsigned int timeout = slash_dfl_timeout;
126126
}
127127
slash_command_subsub(cmd, server, list, cmd_server_list, "", NULL);
128128

129-
static int cmd_server_rm(struct slash *slash) {
129+
static int cmd_server_rm(slash_t *slash) {
130130

131131
unsigned int timeout = slash_dfl_timeout;
132132
unsigned int server = slash_dfl_node;

src/param/list/param_list_slash.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
#include <endian.h>
2626

27-
static int list(struct slash *slash)
27+
static int list(slash_t *slash)
2828
{
2929
int node = slash_dfl_node;
3030
int verbosity = 1;
@@ -63,7 +63,7 @@ Shows cached/known values. Use -v to include parameter type and help text.");
6363
slash_command(list, list, "[OPTIONS...] [name wildcard=*]", "List parameters");
6464

6565

66-
static int list_download(struct slash *slash)
66+
static int list_download(slash_t *slash)
6767
{
6868
unsigned int node = slash_dfl_node;
6969
unsigned int timeout = slash_dfl_timeout;
@@ -99,7 +99,7 @@ Parameters can be manually added with 'list add'.");
9999
}
100100
slash_command_sub(list, download, list_download, "[OPTIONS...] [node]", "Download a list of remote parameters");
101101

102-
static int list_forget(struct slash *slash)
102+
static int list_forget(slash_t *slash)
103103
{
104104

105105
int node = slash_dfl_node;
@@ -129,7 +129,7 @@ This makes it possible to download them again, in cases where they've changed.")
129129
slash_command_sub(list, forget, list_forget, "[node]", "Forget remote parameters. Omit or set node to -1 to include all.");
130130

131131

132-
static int list_add(struct slash *slash)
132+
static int list_add(slash_t *slash)
133133
{
134134
unsigned int node = slash_dfl_node;
135135
unsigned int array_len = 0;
@@ -211,7 +211,7 @@ slash_command_sub(list, add, list_add, "<name> <id> <type>", NULL);
211211

212212

213213

214-
static int list_save(struct slash *slash) {
214+
static int list_save(slash_t *slash) {
215215

216216
char * filename = NULL;
217217
int node = slash_dfl_node;

src/param/list/param_list_store_slash.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include "param_list_store.h"
1818

1919

20-
static int param_list_store_vmem_save_slash(struct slash *slash)
20+
static int param_list_store_vmem_save_slash(slash_t *slash)
2121
{
2222
if (slash->argc != 2)
2323
return SLASH_EUSAGE;
@@ -28,7 +28,7 @@ static int param_list_store_vmem_save_slash(struct slash *slash)
2828
}
2929
slash_command_sub(list, save, param_list_store_vmem_save_slash, "<vmem_id>", NULL);
3030

31-
static int param_list_store_vmem_load_slash(struct slash *slash)
31+
static int param_list_store_vmem_load_slash(slash_t *slash)
3232
{
3333
if (slash->argc != 2)
3434
return SLASH_EUSAGE;

src/param/param_slash.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ static void param_slash_parse(char * arg, int node, param_t **param, int *offset
5858

5959
}
6060

61-
static void param_completer(struct slash *slash, char * token) {
61+
static void param_completer(slash_t *slash, char * token) {
6262

6363
int matches = 0;
6464
size_t prefixlen = -1;
@@ -136,7 +136,7 @@ static void param_completer(struct slash *slash, char * token) {
136136
if (skip_prefix) slash_completer_revert_skip(slash, orig_slash_buf);
137137
}
138138

139-
static int cmd_get(struct slash *slash) {
139+
static int cmd_get(slash_t *slash) {
140140

141141
int node = slash_dfl_node;
142142
int paramver = 2;
@@ -204,7 +204,7 @@ static int cmd_get(struct slash *slash) {
204204
}
205205
slash_command_completer(get, cmd_get, param_completer, "<param>", "Get");
206206

207-
static int cmd_set(struct slash *slash) {
207+
static int cmd_set(slash_t *slash) {
208208

209209
int node = slash_dfl_node;
210210
int paramver = 2;
@@ -299,7 +299,7 @@ slash_command_completer(set, cmd_set, param_completer, "<param> <value>", "Set")
299299

300300

301301

302-
static int cmd_add(struct slash *slash) {
302+
static int cmd_add(slash_t *slash) {
303303

304304
int node = slash_dfl_node;
305305
char * include_mask_str = NULL;
@@ -417,7 +417,7 @@ static int cmd_add(struct slash *slash) {
417417
}
418418
slash_command_sub_completer(cmd, add, cmd_add, param_completer, "<param>[offset] [value]", "Add a new parameter to a command");
419419

420-
static int cmd_run(struct slash *slash) {
420+
static int cmd_run(slash_t *slash) {
421421

422422
unsigned int timeout = slash_dfl_timeout;
423423
unsigned int server = slash_dfl_node;
@@ -464,7 +464,7 @@ static int cmd_run(struct slash *slash) {
464464
}
465465
slash_command_sub(cmd, run, cmd_run, "", NULL);
466466

467-
static int cmd_pull(struct slash *slash) {
467+
static int cmd_pull(slash_t *slash) {
468468

469469
unsigned int timeout = slash_dfl_timeout;
470470
unsigned int server = slash_dfl_node;
@@ -505,7 +505,7 @@ static int cmd_pull(struct slash *slash) {
505505
}
506506
slash_command(pull, cmd_pull, "", "Pull all metrics");
507507

508-
static int cmd_new(struct slash *slash) {
508+
static int cmd_new(slash_t *slash) {
509509

510510
int paramver = 2;
511511
char *name = NULL;
@@ -559,14 +559,14 @@ static int cmd_new(struct slash *slash) {
559559
slash_command_sub(cmd, new, cmd_new, "<get/set> <cmd name>", "Create a new command");
560560

561561

562-
static int cmd_done(struct slash *slash) {
562+
static int cmd_done(slash_t *slash) {
563563
param_queue.type = PARAM_QUEUE_TYPE_EMPTY;
564564
return SLASH_SUCCESS;
565565
}
566566
slash_command_sub(cmd, done, cmd_done, "", "Exit cmd edit mode");
567567

568568

569-
static int cmd_print(struct slash *slash) {
569+
static int cmd_print(slash_t *slash) {
570570
if (param_queue.type == PARAM_QUEUE_TYPE_EMPTY) {
571571
printf("No active command\n");
572572
} else {

src/param/scheduler/param_scheduler_slash.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include "param_scheduler_client.h"
2828
#include "../param_slash.h"
2929

30-
static int cmd_schedule_push(struct slash *slash) {
30+
static int cmd_schedule_push(slash_t *slash) {
3131

3232
unsigned int timeout = slash_dfl_timeout;
3333
unsigned int server = slash_dfl_node;
@@ -92,7 +92,7 @@ static int cmd_schedule_push(struct slash *slash) {
9292
}
9393
slash_command_sub(schedule, push, cmd_schedule_push, "", NULL);
9494

95-
static int cmd_schedule_list(struct slash *slash) {
95+
static int cmd_schedule_list(slash_t *slash) {
9696

9797
unsigned int server = slash_dfl_node;
9898
unsigned int timeout = slash_dfl_timeout;
@@ -119,7 +119,7 @@ static int cmd_schedule_list(struct slash *slash) {
119119
}
120120
slash_command_sub(schedule, list, cmd_schedule_list, "", NULL);
121121

122-
static int cmd_schedule_show(struct slash *slash) {
122+
static int cmd_schedule_show(slash_t *slash) {
123123

124124
unsigned int server = slash_dfl_node;
125125
unsigned int timeout = slash_dfl_timeout;
@@ -153,7 +153,7 @@ static int cmd_schedule_show(struct slash *slash) {
153153
}
154154
slash_command_sub(schedule, show, cmd_schedule_show, "", NULL);
155155

156-
static int cmd_schedule_rm(struct slash *slash) {
156+
static int cmd_schedule_rm(slash_t *slash) {
157157

158158
unsigned int server = slash_dfl_node;
159159
unsigned int timeout = slash_dfl_timeout;
@@ -204,7 +204,7 @@ static int cmd_schedule_rm(struct slash *slash) {
204204
}
205205
slash_command_sub(schedule, rm, cmd_schedule_rm, "<server> <id> [timeout]", NULL);
206206

207-
static int cmd_schedule_reset(struct slash *slash) {
207+
static int cmd_schedule_reset(slash_t *slash) {
208208

209209
unsigned int server = slash_dfl_node;
210210
unsigned int timeout = slash_dfl_timeout;
@@ -246,7 +246,7 @@ static void parse_name(char out[], char in[]) {
246246
out[strlen(in)] = '\0';
247247
}
248248

249-
static int cmd_schedule_command(struct slash *slash) {
249+
static int cmd_schedule_command(slash_t *slash) {
250250

251251
unsigned int timeout = slash_dfl_timeout;
252252
unsigned int server = slash_dfl_node;

src/vmem/vmem_client_slash.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include <slash/optparse.h>
2525
#include <slash/dflopt.h>
2626

27-
static int vmem_client_slash_list(struct slash *slash)
27+
static int vmem_client_slash_list(slash_t *slash)
2828
{
2929
unsigned int node = slash_dfl_node;
3030
unsigned int timeout = slash_dfl_timeout;
@@ -51,7 +51,7 @@ static int vmem_client_slash_list(struct slash *slash)
5151
slash_command(vmem, vmem_client_slash_list, "", "List virtual memory");
5252

5353
#if 0
54-
static int vmem_client_slash_fram(struct slash *slash, int backup) {
54+
static int vmem_client_slash_fram(slash_t *slash, int backup) {
5555

5656
int node = 0;
5757
int vmem_id;
@@ -93,19 +93,19 @@ static int vmem_client_slash_fram(struct slash *slash, int backup) {
9393
return SLASH_SUCCESS;
9494
}
9595

96-
static int vmem_client_slash_restore(struct slash *slash)
96+
static int vmem_client_slash_restore(slash_t *slash)
9797
{
9898
return vmem_client_slash_fram(slash, 0);
9999
}
100100
slash_command_sub(vmem, restore, vmem_client_slash_restore, "<vmem idx> [node] [timeout]", NULL);
101101

102-
static int vmem_client_slash_backup(struct slash *slash)
102+
static int vmem_client_slash_backup(slash_t *slash)
103103
{
104104
return vmem_client_slash_fram(slash, 1);
105105
}
106106
slash_command_sub(vmem, backup, vmem_client_slash_backup, "<vmem idx> [node] [timeout]", NULL);
107107

108-
static int vmem_client_slash_unlock(struct slash *slash)
108+
static int vmem_client_slash_unlock(slash_t *slash)
109109
{
110110
int node = 0;
111111
int timeout = 2000;

src/vmem/vmem_client_slash_ftp.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <slash/optparse.h>
2323
#include <slash/dflopt.h>
2424

25-
static int vmem_client_slash_download(struct slash *slash)
25+
static int vmem_client_slash_download(slash_t *slash)
2626
{
2727

2828
unsigned int node = slash_dfl_node;
@@ -164,7 +164,7 @@ static int vmem_client_slash_download(struct slash *slash)
164164
}
165165
slash_command(download, vmem_client_slash_download, "<address> <length> <file>", "Download from VMEM to FILE");
166166

167-
static int vmem_client_slash_upload(struct slash *slash)
167+
static int vmem_client_slash_upload(slash_t *slash)
168168
{
169169

170170
unsigned int node = slash_dfl_node;
@@ -254,7 +254,7 @@ static int vmem_client_slash_upload(struct slash *slash)
254254
}
255255
slash_command_completer(upload, vmem_client_slash_upload, slash_path_completer, "<file> <address>", "Upload from FILE to VMEM");
256256

257-
static int vmem_client_slash_crc32(struct slash *slash) {
257+
static int vmem_client_slash_crc32(slash_t *slash) {
258258

259259
unsigned int node = slash_dfl_node;
260260
unsigned int timeout = slash_dfl_timeout;
@@ -377,7 +377,7 @@ unsigned int rdp_dfl_delayed_acks = 1;
377377
unsigned int rdp_dfl_ack_timeout = 2000;
378378
unsigned int rdp_dfl_ack_count = 2;
379379

380-
static int vmem_client_rdp_options(struct slash *slash) {
380+
static int vmem_client_rdp_options(slash_t *slash) {
381381

382382
optparse_t * parser = optparse_new("rdp options", "");
383383
optparse_add_help(parser);

0 commit comments

Comments
 (0)