#include <xvfs-core.h>
#include <unistd.h>
#include <tcl.h>
typedef enum {
XVFS_FILE_TYPE_REG,
XVFS_FILE_TYPE_DIR
} xvfs_file_type_t;
typedef Tcl_WideInt xvfs_size_t;
struct xvfs_file_data {
const char *name;
xvfs_file_type_t type;
xvfs_size_t size;
const unsigned char *data;
};
<?
package require xvfs
xvfs::main $argv
?>
static const char **xvfs_<?= $::xvfs::fsName ?>_getChildren(const char *path, Tcl_WideInt limit) {
return(NULL);
}
static const unsigned char *xvfs_<?= $::xvfs::fsName ?>_getData(const char *path, Tcl_WideInt start, Tcl_WideInt length) {
return(NULL);
}
int Xvfs_<?= $::xvfs::fsName ?>_Init() {
int register_ret;
register_ret = Xvfs_Register("<?= $::xvfs::fsName ?>", XVFS_PROTOCOL_VERSION, xvfs_<?= $::xvfs::fsName ?>_getChildren, xvfs_<?= $::xvfs::fsName ?>_getData);
if (register_ret != TCL_OK) {
return(register_ret);
}
return(TCL_OK);
}