Am 2011-11-16 00:53, schrieb Iain Buclaw:

Rather than using toStringz, you should be able to get by with
declaring the register_chrdev function as follows.

extern(C)
int register_chrdev (uint major, in char *name, file_operations *fops)

This yields the following compiler error:

Error: cannot implicitly convert expression (DEVICE_NAME) of type char[] to char*

If I try to cast with register_chrdev(0, (char*)DEVICE_NAME, &fops); the following error appears:

C style cast illegal, use cast(char*)DEVICE_NAME

Best regards

Michael

Reply via email to