git.samba.org
/
amitay
/
dbench.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9d2cdbe
)
Add handling of /clients/client? to the SMB backend
author
root
<root@int001st001.VSOFS1.COM>
Sun, 6 Dec 2009 22:51:07 +0000
(09:51 +1100)
committer
root
<root@int001st001.VSOFS1.COM>
Sun, 6 Dec 2009 22:51:07 +0000
(09:51 +1100)
smb.c
patch
|
blob
|
history
diff --git
a/smb.c
b/smb.c
index 23e8e344c2366e4cdfc5e80282b0b4f679821ea1..5d229d3494b0d4f9268a1dcdaa0dc6816f580e38 100644
(file)
--- a/
smb.c
+++ b/
smb.c
@@
-315,7
+315,6
@@
static int smb_init(void)
*tmp = '\0';
smb_share = tmp+1;
*tmp = '\0';
smb_share = tmp+1;
-
if (options.smb_user == NULL) {
fprintf(stderr, "You must specify --smb-user=[<domain>/]<user>%%<password> with the \"smb\" backend.\n");
return 1;
if (options.smb_user == NULL) {
fprintf(stderr, "You must specify --smb-user=[<domain>/]<user>%%<password> with the \"smb\" backend.\n");
return 1;
@@
-370,6
+369,8
@@
static int smb_init(void)
static void smb_setup(struct child_struct *child)
{
struct smb_child *ctx;
static void smb_setup(struct child_struct *child)
{
struct smb_child *ctx;
+ char *str;
+ int ret;
ctx = malloc(sizeof(struct smb_child));
if (ctx == NULL) {
ctx = malloc(sizeof(struct smb_child));
if (ctx == NULL) {
@@
-394,6
+395,18
@@
static void smb_setup(struct child_struct *child)
}
smbc_setOptionUrlEncodeReaddirEntries(ctx->ctx, True);
smbc_set_context(ctx->ctx);
}
smbc_setOptionUrlEncodeReaddirEntries(ctx->ctx, True);
smbc_set_context(ctx->ctx);
+
+
+ /* create clients and /clients/client? */
+ asprintf(&str, "smb://%s/%s/clients", smb_server, smb_share);
+ smbc_mkdir(str, 0777);
+ free(str);
+ asprintf(&str, "smb://%s/%s/clients/client%d", smb_server, smb_share, child->id);
+ smbc_mkdir(str, 0777);
+ free(str);
+
+
+ asprintf(&smb_share, "%s/clients/client%d", smb_share, child->id);
}
static void smb_mkdir(struct dbench_op *op)
}
static void smb_mkdir(struct dbench_op *op)