I'm trying to use ddi_copyin to copy a string from a user application to a 
psuedo driver in kernel space.

How do I copy data and print it out?  Anyone know of any resources I can look 
at with an example?

Here's the ioctl code:

char *strPtr, *string;
...
                case STR_COPY:
                        ddi_copyin((char *)arg, strPtr, sizeof (char*), mode);
                        strcpy(string, strPtr); // EXPLODES HERE
                        break;
...

User code:

                        ioctl(fd, STR_COPY, stringPtr);

New to driver programming, be gentle...

Thanks
 
 
This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to