cdev_control()

Handle process-container character device operations

Synopsis:

#include <qvm/cdev.h>
int cdev_control(struct cdev_state *cds,
                 unsigned ctrl,
                 const char *arg)

Arguments:

cds
A pointer to a structure with the state of the character device.
ctrl
The operation to perform.
arg
A pointer to parameters for the operation.

Library:

Provided by qvm; no external library is required.

Description:

Before calling this function, you must call cdev_setup() to set up the character device's state structure.

Returns:

EOK on success; otherwise an error.