Lines Matching refs:cmd

38 static enum hmcdrv_ftp_cmdid hmcdrv_ftp_cmd_getid(const char *cmd, int len);
39 static int hmcdrv_ftp_parse(char *cmd, struct hmcdrv_ftp_cmdspec *ftp);
50 static enum hmcdrv_ftp_cmdid hmcdrv_ftp_cmd_getid(const char *cmd, int len) in hmcdrv_ftp_cmd_getid() argument
55 enum hmcdrv_ftp_cmdid cmd; /* associated command as enum */ in hmcdrv_ftp_cmd_getid() member
70 .cmd = HMCDRV_FTP_GET}, in hmcdrv_ftp_cmd_getid()
72 .cmd = HMCDRV_FTP_DIR}, in hmcdrv_ftp_cmd_getid()
74 .cmd = HMCDRV_FTP_DELETE}, in hmcdrv_ftp_cmd_getid()
76 .cmd = HMCDRV_FTP_NLIST}, in hmcdrv_ftp_cmd_getid()
78 .cmd = HMCDRV_FTP_PUT}, in hmcdrv_ftp_cmd_getid()
80 .cmd = HMCDRV_FTP_APPEND}, in hmcdrv_ftp_cmd_getid()
91 crc = crc16(crc, cmd, len); in hmcdrv_ftp_cmd_getid()
94 cmd, crc, (crc % ARRAY_SIZE(ftpcmds))); in hmcdrv_ftp_cmd_getid()
96 if (!pdesc->str || strncmp(pdesc->str, cmd, len)) in hmcdrv_ftp_cmd_getid()
100 pdesc->str, pdesc->cmd); in hmcdrv_ftp_cmd_getid()
102 return pdesc->cmd; in hmcdrv_ftp_cmd_getid()
112 static int hmcdrv_ftp_parse(char *cmd, struct hmcdrv_ftp_cmdspec *ftp) in hmcdrv_ftp_parse() argument
120 while (*cmd != '\0') { in hmcdrv_ftp_parse()
122 while (isspace(*cmd)) in hmcdrv_ftp_parse()
123 ++cmd; in hmcdrv_ftp_parse()
125 if (*cmd == '\0') in hmcdrv_ftp_parse()
128 start = cmd; in hmcdrv_ftp_parse()
132 while ((*cmd != '\0') && !isspace(*cmd)) in hmcdrv_ftp_parse()
133 ++cmd; in hmcdrv_ftp_parse()
134 ftp->id = hmcdrv_ftp_cmd_getid(start, cmd - start); in hmcdrv_ftp_parse()
137 while ((*cmd != '\0') && !iscntrl(*cmd)) in hmcdrv_ftp_parse()
138 ++cmd; in hmcdrv_ftp_parse()
142 *cmd = '\0'; in hmcdrv_ftp_parse()
237 ssize_t hmcdrv_ftp_cmd(char __kernel *cmd, loff_t offset, in hmcdrv_ftp_cmd() argument
243 ssize_t retlen = hmcdrv_ftp_parse(cmd, &ftp); in hmcdrv_ftp_cmd()