aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p/conv.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/9p/conv.c')
-rw-r--r--fs/9p/conv.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/fs/9p/conv.c b/fs/9p/conv.c
index bf1f10067960..a767e05b60bf 100644
--- a/fs/9p/conv.c
+++ b/fs/9p/conv.c
@@ -8,9 +8,8 @@
8 * Copyright (C) 2002 by Ron Minnich <rminnich@lanl.gov> 8 * Copyright (C) 2002 by Ron Minnich <rminnich@lanl.gov>
9 * 9 *
10 * This program is free software; you can redistribute it and/or modify 10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by 11 * it under the terms of the GNU General Public License version 2
12 * the Free Software Foundation; either version 2 of the License, or 12 * as published by the Free Software Foundation.
13 * (at your option) any later version.
14 * 13 *
15 * This program is distributed in the hope that it will be useful, 14 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -536,6 +535,7 @@ struct v9fs_fcall *v9fs_create_tversion(u32 msize, char *version)
536 return fc; 535 return fc;
537} 536}
538 537
538#if 0
539struct v9fs_fcall *v9fs_create_tauth(u32 afid, char *uname, char *aname) 539struct v9fs_fcall *v9fs_create_tauth(u32 afid, char *uname, char *aname)
540{ 540{
541 int size; 541 int size;
@@ -559,6 +559,7 @@ struct v9fs_fcall *v9fs_create_tauth(u32 afid, char *uname, char *aname)
559 error: 559 error:
560 return fc; 560 return fc;
561} 561}
562#endif /* 0 */
562 563
563struct v9fs_fcall * 564struct v9fs_fcall *
564v9fs_create_tattach(u32 fid, u32 afid, char *uname, char *aname) 565v9fs_create_tattach(u32 fid, u32 afid, char *uname, char *aname)
@@ -664,7 +665,8 @@ struct v9fs_fcall *v9fs_create_topen(u32 fid, u8 mode)
664 return fc; 665 return fc;
665} 666}
666 667
667struct v9fs_fcall *v9fs_create_tcreate(u32 fid, char *name, u32 perm, u8 mode) 668struct v9fs_fcall *v9fs_create_tcreate(u32 fid, char *name, u32 perm, u8 mode,
669 char *extension, int extended)
668{ 670{
669 int size; 671 int size;
670 struct v9fs_fcall *fc; 672 struct v9fs_fcall *fc;
@@ -672,6 +674,9 @@ struct v9fs_fcall *v9fs_create_tcreate(u32 fid, char *name, u32 perm, u8 mode)
672 struct cbuf *bufp = &buffer; 674 struct cbuf *bufp = &buffer;
673 675
674 size = 4 + 2 + strlen(name) + 4 + 1; /* fid[4] name[s] perm[4] mode[1] */ 676 size = 4 + 2 + strlen(name) + 4 + 1; /* fid[4] name[s] perm[4] mode[1] */
677 if (extended && extension!=NULL)
678 size += 2 + strlen(extension); /* extension[s] */
679
675 fc = v9fs_create_common(bufp, size, TCREATE); 680 fc = v9fs_create_common(bufp, size, TCREATE);
676 if (IS_ERR(fc)) 681 if (IS_ERR(fc))
677 goto error; 682 goto error;
@@ -680,6 +685,8 @@ struct v9fs_fcall *v9fs_create_tcreate(u32 fid, char *name, u32 perm, u8 mode)
680 v9fs_put_str(bufp, name, &fc->params.tcreate.name); 685 v9fs_put_str(bufp, name, &fc->params.tcreate.name);
681 v9fs_put_int32(bufp, perm, &fc->params.tcreate.perm); 686 v9fs_put_int32(bufp, perm, &fc->params.tcreate.perm);
682 v9fs_put_int8(bufp, mode, &fc->params.tcreate.mode); 687 v9fs_put_int8(bufp, mode, &fc->params.tcreate.mode);
688 if (extended)
689 v9fs_put_str(bufp, extension, &fc->params.tcreate.extension);
683 690
684 if (buf_check_overflow(bufp)) { 691 if (buf_check_overflow(bufp)) {
685 kfree(fc); 692 kfree(fc);