Lines Matching refs:cmd
37 static enum hmcdrv_ftp_cmdid hmcdrv_ftp_cmd_getid(const char *cmd, int len);
38 static int hmcdrv_ftp_parse(char *cmd, struct hmcdrv_ftp_cmdspec *ftp);
49 static enum hmcdrv_ftp_cmdid hmcdrv_ftp_cmd_getid(const char *cmd, int len) in hmcdrv_ftp_cmd_getid() argument
54 enum hmcdrv_ftp_cmdid cmd; /* associated command as enum */ in hmcdrv_ftp_cmd_getid() member
69 .cmd = HMCDRV_FTP_GET}, in hmcdrv_ftp_cmd_getid()
71 .cmd = HMCDRV_FTP_DIR}, in hmcdrv_ftp_cmd_getid()
73 .cmd = HMCDRV_FTP_DELETE}, in hmcdrv_ftp_cmd_getid()
75 .cmd = HMCDRV_FTP_NLIST}, in hmcdrv_ftp_cmd_getid()
77 .cmd = HMCDRV_FTP_PUT}, in hmcdrv_ftp_cmd_getid()
79 .cmd = HMCDRV_FTP_APPEND}, in hmcdrv_ftp_cmd_getid()
90 crc = crc16(crc, cmd, len); in hmcdrv_ftp_cmd_getid()
93 cmd, crc, (crc % ARRAY_SIZE(ftpcmds))); in hmcdrv_ftp_cmd_getid()
95 if (!pdesc->str || strncmp(pdesc->str, cmd, len)) in hmcdrv_ftp_cmd_getid()
99 pdesc->str, pdesc->cmd); in hmcdrv_ftp_cmd_getid()
101 return pdesc->cmd; in hmcdrv_ftp_cmd_getid()
111 static int hmcdrv_ftp_parse(char *cmd, struct hmcdrv_ftp_cmdspec *ftp) in hmcdrv_ftp_parse() argument
119 while (*cmd != '\0') { in hmcdrv_ftp_parse()
121 while (isspace(*cmd)) in hmcdrv_ftp_parse()
122 ++cmd; in hmcdrv_ftp_parse()
124 if (*cmd == '\0') in hmcdrv_ftp_parse()
127 start = cmd; in hmcdrv_ftp_parse()
131 while ((*cmd != '\0') && !isspace(*cmd)) in hmcdrv_ftp_parse()
132 ++cmd; in hmcdrv_ftp_parse()
133 ftp->id = hmcdrv_ftp_cmd_getid(start, cmd - start); in hmcdrv_ftp_parse()
136 while ((*cmd != '\0') && !iscntrl(*cmd)) in hmcdrv_ftp_parse()
137 ++cmd; in hmcdrv_ftp_parse()
141 *cmd = '\0'; in hmcdrv_ftp_parse()
236 ssize_t hmcdrv_ftp_cmd(char __kernel *cmd, loff_t offset, in hmcdrv_ftp_cmd() argument
242 ssize_t retlen = hmcdrv_ftp_parse(cmd, &ftp); in hmcdrv_ftp_cmd()