void c95_types() { printf(" mod c95 {\n"); put_type("c_char", char); put_type("c_schar", signed char); put_type("c_uchar", unsigned char); put_type("c_short", short); put_type("c_ushort", unsigned short); put_type("c_int", int); put_type("c_uint", unsigned int); put_type("c_long", long); put_type("c_ulong", unsigned long); put_ftype("c_float", float); put_ftype("c_double", double); put_type("size_t", size_t); put_type("ptrdiff_t", ptrdiff_t); put_type("clock_t", clock_t); put_type("time_t", time_t); put_type("wchar_t", wchar_t); printf(" }\n"); }
void c99_types() { printf(" mod c99 {\n"); put_type("c_longlong", long long); put_type("c_ulonglong", unsigned long long); put_type("intptr_t", intptr_t); put_type("uintptr_t", uintptr_t); printf(" }\n"); }
struct dm_dirty_log *dm_dirty_log_create(const char *type_name, struct dm_target *ti, int (*flush_callback_fn)(struct dm_target *ti), unsigned int argc, char **argv) { struct dm_dirty_log_type *type; struct dm_dirty_log *log; log = kmalloc(sizeof(*log), GFP_KERNEL); if (!log) return NULL; type = get_type(type_name); if (!type) { kfree(log); return NULL; } log->flush_callback_fn = flush_callback_fn; log->type = type; if (type->ctr(log, ti, argc, argv)) { kfree(log); put_type(type); return NULL; } return log; }
static void print_type (image_header_t *hdr) { LOG ("%s %s %s (%s)\n", put_arch (hdr->ih_arch), put_os (hdr->ih_os ), put_type (hdr->ih_type), put_comp (hdr->ih_comp) ); }
void posix88_types() { printf(" mod posix88 {\n"); put_type("off_t", off_t); put_type("dev_t", dev_t); put_type("ino_t", ino_t); put_type("pid_t", pid_t); #ifndef __WIN32__ put_type("uid_t", uid_t); put_type("gid_t", gid_t); #endif put_type("useconds_t", useconds_t); put_type("mode_t", mode_t); put_type("ssize_t", ssize_t); printf(" }\n"); }
void dm_dirty_log_destroy(struct dm_dirty_log *log) { log->type->dtr(log); put_type(log->type); kfree(log); }