"How many seconds of warmup to run", NULL },
{ "machine-readable", 0, POPT_ARG_NONE, &options.machine_readable, 0,
"Print data in more machine-readable friendly format", NULL},
+ { "smb-server", 0, POPT_ARG_STRING, &options.smb_server, 0,
+ "name/ip of SMB server", NULL },
+ { "smb-share", 0, POPT_ARG_STRING, &options.smb_share, 0,
+ "name of SMB share", NULL },
+ { "smb-user", 0, POPT_ARG_STRING, &options.smb_user, 0,
+ "User to authenticate as : [<domain>/]<user>%<password>", NULL },
POPT_TABLEEND
};
poptContext pc;
} else if (strcmp(options.backend, "iscsi") == 0) {
extern struct nb_operations iscsi_ops;
nb_ops = &iscsi_ops;
+ } else if (strcmp(options.backend, "smb") == 0) {
+ extern struct nb_operations smb_ops;
+ nb_ops = &smb_ops;
} else {
printf("Unknown backend '%s'\n", options.backend);
exit(1);
#define discard_const(ptr) ((void *)((intptr_t)(ptr)))
+static int smb_init(void)
+{
+ if (options.smb_server == NULL) {
+ printf("You must specify --smb-server=<server> with the \"smb\" backend.\n");
+ return 1;
+ }
+ if (options.smb_share == NULL) {
+ printf("You must specify --smb-share=<share> with the \"smb\" backend.\n");
+ return 1;
+ }
+ if (options.smb_user == NULL) {
+ printf("You must specify --smb-user=[<domain>/]<user>%<password> with the \"smb\" backend.\n");
+ return 1;
+ }
+
+ printf("smb_init\n");
+
+
+ return 1;
+}
+
+static void smb_setup(struct child_struct *child)
+{
+ printf("smb_setup\n");
+}
+
+static void smb_cleanup(struct child_struct *child)
+{
+ printf("smb_cleanup\n");
+}
+
+
+static struct backend_op ops[] = {
+ { NULL, NULL}
+};
+
+struct nb_operations smb_ops = {
+ .backend_name = "smbbench",
+ .init = smb_init,
+ .setup = smb_setup,
+ .cleanup = smb_cleanup,
+ .ops = ops
+};