diff options
author | Eric Van Hensbergen <ericvh@gmail.com> | 2008-10-16 09:29:30 -0400 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@gmail.com> | 2008-10-17 12:06:57 -0400 |
commit | 02da398b950c5d079c20afaa23f322383e96070a (patch) | |
tree | cbc49a6ef8a175df705e6e66627a800a26995af9 /include/net/9p | |
parent | 51a87c552dfd428e304c865e24ecbe091556f226 (diff) |
9p: eliminate depricated conv functions
Remove depricated conv functions which have been replaced with new
protocol routines.
This patch also reworks the one instance of the file-system code which
directly calls conversion routines (to accomplish unpacking dirreads).
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'include/net/9p')
-rw-r--r-- | include/net/9p/9p.h | 107 | ||||
-rw-r--r-- | include/net/9p/client.h | 2 |
2 files changed, 12 insertions, 97 deletions
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h index 56c15aee6e61..cb5bc731e885 100644 --- a/include/net/9p/9p.h +++ b/include/net/9p/9p.h | |||
@@ -61,21 +61,18 @@ extern unsigned int p9_debug_level; | |||
61 | 61 | ||
62 | #define P9_DPRINTK(level, format, arg...) \ | 62 | #define P9_DPRINTK(level, format, arg...) \ |
63 | do { \ | 63 | do { \ |
64 | if (level == P9_DEBUG_9P) \ | 64 | if ((p9_debug_level & level) == level) {\ |
65 | printk(KERN_NOTICE "(%8.8d) " \ | 65 | if (level == P9_DEBUG_9P) \ |
66 | format , task_pid_nr(current) , ## arg); \ | 66 | printk(KERN_NOTICE "(%8.8d) " \ |
67 | else if ((p9_debug_level & level) == level) \ | 67 | format , task_pid_nr(current) , ## arg); \ |
68 | printk(KERN_NOTICE "-- %s (%d): " \ | 68 | else \ |
69 | format , __func__, task_pid_nr(current) , ## arg); \ | 69 | printk(KERN_NOTICE "-- %s (%d): " \ |
70 | format , __func__, task_pid_nr(current) , ## arg); \ | ||
71 | } \ | ||
70 | } while (0) | 72 | } while (0) |
71 | 73 | ||
72 | #define PRINT_FCALL_ERROR(s, fcall) P9_DPRINTK(P9_DEBUG_ERROR, \ | ||
73 | "%s: %.*s\n", s, fcall?fcall->params.rerror.error.len:0, \ | ||
74 | fcall?fcall->params.rerror.error.str:""); | ||
75 | |||
76 | #else | 74 | #else |
77 | #define P9_DPRINTK(level, format, arg...) do { } while (0) | 75 | #define P9_DPRINTK(level, format, arg...) do { } while (0) |
78 | #define PRINT_FCALL_ERROR(s, fcall) do { } while (0) | ||
79 | #endif | 76 | #endif |
80 | 77 | ||
81 | #define P9_EPRINTK(level, format, arg...) \ | 78 | #define P9_EPRINTK(level, format, arg...) \ |
@@ -330,33 +327,6 @@ struct p9_qid { | |||
330 | * See Also: http://plan9.bell-labs.com/magic/man2html/2/stat | 327 | * See Also: http://plan9.bell-labs.com/magic/man2html/2/stat |
331 | */ | 328 | */ |
332 | 329 | ||
333 | struct p9_stat { | ||
334 | u16 size; | ||
335 | u16 type; | ||
336 | u32 dev; | ||
337 | struct p9_qid qid; | ||
338 | u32 mode; | ||
339 | u32 atime; | ||
340 | u32 mtime; | ||
341 | u64 length; | ||
342 | struct p9_str name; | ||
343 | struct p9_str uid; | ||
344 | struct p9_str gid; | ||
345 | struct p9_str muid; | ||
346 | struct p9_str extension; /* 9p2000.u extensions */ | ||
347 | u32 n_uid; /* 9p2000.u extensions */ | ||
348 | u32 n_gid; /* 9p2000.u extensions */ | ||
349 | u32 n_muid; /* 9p2000.u extensions */ | ||
350 | }; | ||
351 | |||
352 | /* | ||
353 | * file metadata (stat) structure used to create Twstat message | ||
354 | * The is identical to &p9_stat, but the strings don't point to | ||
355 | * the same memory block and should be freed separately | ||
356 | * | ||
357 | * See Also: http://plan9.bell-labs.com/magic/man2html/2/stat | ||
358 | */ | ||
359 | |||
360 | struct p9_wstat { | 330 | struct p9_wstat { |
361 | u16 size; | 331 | u16 size; |
362 | u16 type; | 332 | u16 type; |
@@ -498,12 +468,12 @@ struct p9_tstat { | |||
498 | }; | 468 | }; |
499 | 469 | ||
500 | struct p9_rstat { | 470 | struct p9_rstat { |
501 | struct p9_stat stat; | 471 | struct p9_wstat stat; |
502 | }; | 472 | }; |
503 | 473 | ||
504 | struct p9_twstat { | 474 | struct p9_twstat { |
505 | u32 fid; | 475 | u32 fid; |
506 | struct p9_stat stat; | 476 | struct p9_wstat stat; |
507 | }; | 477 | }; |
508 | 478 | ||
509 | struct p9_rwstat { | 479 | struct p9_rwstat { |
@@ -517,7 +487,6 @@ struct p9_rwstat { | |||
517 | * @offset: used by marshalling routines to track currentposition in buffer | 487 | * @offset: used by marshalling routines to track currentposition in buffer |
518 | * @capacity: used by marshalling routines to track total capacity | 488 | * @capacity: used by marshalling routines to track total capacity |
519 | * @sdata: payload | 489 | * @sdata: payload |
520 | * @params: per-operation parameters | ||
521 | * | 490 | * |
522 | * &p9_fcall represents the structure for all 9P RPC | 491 | * &p9_fcall represents the structure for all 9P RPC |
523 | * transactions. Requests are packaged into fcalls, and reponses | 492 | * transactions. Requests are packaged into fcalls, and reponses |
@@ -535,66 +504,10 @@ struct p9_fcall { | |||
535 | size_t capacity; | 504 | size_t capacity; |
536 | 505 | ||
537 | uint8_t *sdata; | 506 | uint8_t *sdata; |
538 | |||
539 | union { | ||
540 | struct p9_tversion tversion; | ||
541 | struct p9_rversion rversion; | ||
542 | struct p9_tauth tauth; | ||
543 | struct p9_rauth rauth; | ||
544 | struct p9_rerror rerror; | ||
545 | struct p9_tflush tflush; | ||
546 | struct p9_rflush rflush; | ||
547 | struct p9_tattach tattach; | ||
548 | struct p9_rattach rattach; | ||
549 | struct p9_twalk twalk; | ||
550 | struct p9_rwalk rwalk; | ||
551 | struct p9_topen topen; | ||
552 | struct p9_ropen ropen; | ||
553 | struct p9_tcreate tcreate; | ||
554 | struct p9_rcreate rcreate; | ||
555 | struct p9_tread tread; | ||
556 | struct p9_rread rread; | ||
557 | struct p9_twrite twrite; | ||
558 | struct p9_rwrite rwrite; | ||
559 | struct p9_tclunk tclunk; | ||
560 | struct p9_rclunk rclunk; | ||
561 | struct p9_tremove tremove; | ||
562 | struct p9_rremove rremove; | ||
563 | struct p9_tstat tstat; | ||
564 | struct p9_rstat rstat; | ||
565 | struct p9_twstat twstat; | ||
566 | struct p9_rwstat rwstat; | ||
567 | } params; | ||
568 | }; | 507 | }; |
569 | 508 | ||
570 | struct p9_idpool; | 509 | struct p9_idpool; |
571 | 510 | ||
572 | int p9_deserialize_stat(void *buf, u32 buflen, struct p9_stat *stat, | ||
573 | int dotu); | ||
574 | int p9_deserialize_fcall(void *buf, u32 buflen, struct p9_fcall *fc, int dotu); | ||
575 | void p9_set_tag(struct p9_fcall *fc, u16 tag); | ||
576 | struct p9_fcall *p9_create_tversion(u32 msize, char *version); | ||
577 | struct p9_fcall *p9_create_tattach(u32 fid, u32 afid, char *uname, | ||
578 | char *aname, u32 n_uname, int dotu); | ||
579 | struct p9_fcall *p9_create_tauth(u32 afid, char *uname, char *aname, | ||
580 | u32 n_uname, int dotu); | ||
581 | struct p9_fcall *p9_create_tflush(u16 oldtag); | ||
582 | struct p9_fcall *p9_create_twalk(u32 fid, u32 newfid, u16 nwname, | ||
583 | char **wnames); | ||
584 | struct p9_fcall *p9_create_topen(u32 fid, u8 mode); | ||
585 | struct p9_fcall *p9_create_tcreate(u32 fid, char *name, u32 perm, u8 mode, | ||
586 | char *extension, int dotu); | ||
587 | struct p9_fcall *p9_create_tread(u32 fid, u64 offset, u32 count); | ||
588 | struct p9_fcall *p9_create_twrite(u32 fid, u64 offset, u32 count, | ||
589 | const char *data); | ||
590 | struct p9_fcall *p9_create_twrite_u(u32 fid, u64 offset, u32 count, | ||
591 | const char __user *data); | ||
592 | struct p9_fcall *p9_create_tclunk(u32 fid); | ||
593 | struct p9_fcall *p9_create_tremove(u32 fid); | ||
594 | struct p9_fcall *p9_create_tstat(u32 fid); | ||
595 | struct p9_fcall *p9_create_twstat(u32 fid, struct p9_wstat *wstat, | ||
596 | int dotu); | ||
597 | |||
598 | int p9_errstr2errno(char *errstr, int len); | 511 | int p9_errstr2errno(char *errstr, int len); |
599 | 512 | ||
600 | struct p9_idpool *p9_idpool_create(void); | 513 | struct p9_idpool *p9_idpool_create(void); |
diff --git a/include/net/9p/client.h b/include/net/9p/client.h index 1e49b4d1030b..1f17f3d93727 100644 --- a/include/net/9p/client.h +++ b/include/net/9p/client.h | |||
@@ -206,6 +206,8 @@ int p9_client_wstat(struct p9_fid *fid, struct p9_wstat *wst); | |||
206 | struct p9_req_t *p9_tag_lookup(struct p9_client *, u16); | 206 | struct p9_req_t *p9_tag_lookup(struct p9_client *, u16); |
207 | void p9_client_cb(struct p9_client *c, struct p9_req_t *req); | 207 | void p9_client_cb(struct p9_client *c, struct p9_req_t *req); |
208 | 208 | ||
209 | int p9stat_read(char *, int, struct p9_wstat *, int); | ||
209 | void p9stat_free(struct p9_wstat *); | 210 | void p9stat_free(struct p9_wstat *); |
210 | 211 | ||
212 | |||
211 | #endif /* NET_9P_CLIENT_H */ | 213 | #endif /* NET_9P_CLIENT_H */ |