![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0 */ 0002 /* 0003 * SE/HMC Drive FTP Services 0004 * 0005 * Copyright IBM Corp. 2013 0006 * Author(s): Ralf Hoppe (rhoppe@de.ibm.com) 0007 */ 0008 0009 #ifndef __HMCDRV_FTP_H__ 0010 #define __HMCDRV_FTP_H__ 0011 0012 #include <linux/types.h> /* size_t, loff_t */ 0013 0014 /* 0015 * HMC drive FTP Service max. length of path (w/ EOS) 0016 */ 0017 #define HMCDRV_FTP_FIDENT_MAX 192 0018 0019 /** 0020 * enum hmcdrv_ftp_cmdid - HMC drive FTP commands 0021 * @HMCDRV_FTP_NOOP: do nothing (only for probing) 0022 * @HMCDRV_FTP_GET: read a file 0023 * @HMCDRV_FTP_PUT: (over-) write a file 0024 * @HMCDRV_FTP_APPEND: append to a file 0025 * @HMCDRV_FTP_DIR: list directory long (ls -l) 0026 * @HMCDRV_FTP_NLIST: list files, no directories (name list) 0027 * @HMCDRV_FTP_DELETE: delete a file 0028 * @HMCDRV_FTP_CANCEL: cancel operation (SCLP/LPAR only) 0029 */ 0030 enum hmcdrv_ftp_cmdid { 0031 HMCDRV_FTP_NOOP = 0, 0032 HMCDRV_FTP_GET = 1, 0033 HMCDRV_FTP_PUT = 2, 0034 HMCDRV_FTP_APPEND = 3, 0035 HMCDRV_FTP_DIR = 4, 0036 HMCDRV_FTP_NLIST = 5, 0037 HMCDRV_FTP_DELETE = 6, 0038 HMCDRV_FTP_CANCEL = 7 0039 }; 0040 0041 /** 0042 * struct hmcdrv_ftp_cmdspec - FTP command specification 0043 * @id: FTP command ID 0044 * @ofs: offset in file 0045 * @fname: filename (ASCII), null-terminated 0046 * @buf: kernel-space transfer data buffer, 4k aligned 0047 * @len: (max) number of bytes to transfer from/to @buf 0048 */ 0049 struct hmcdrv_ftp_cmdspec { 0050 enum hmcdrv_ftp_cmdid id; 0051 loff_t ofs; 0052 const char *fname; 0053 void __kernel *buf; 0054 size_t len; 0055 }; 0056 0057 int hmcdrv_ftp_startup(void); 0058 void hmcdrv_ftp_shutdown(void); 0059 int hmcdrv_ftp_probe(void); 0060 ssize_t hmcdrv_ftp_do(const struct hmcdrv_ftp_cmdspec *ftp); 0061 ssize_t hmcdrv_ftp_cmd(char __kernel *cmd, loff_t offset, 0062 char __user *buf, size_t len); 0063 0064 #endif /* __HMCDRV_FTP_H__ */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |