Logo Search packages:      
Sourcecode: linux version File versions  Download package

static int drm__clients_info ( char *  buf,
char **  start,
off_t  offset,
int  request,
int *  eof,
void *  data 
) [static]

Called when "/proc/dri/.../clients" is read.

buf output buffer.
start start of output data.
offset requested start offset.
request requested number of bytes.
eof whether there is no more data to return.
data private data.
number of written bytes.

Definition at line 429 of file drm_proc.c.

Referenced by drm_clients_info().

      struct drm_device *dev = (struct drm_device *) data;
      int len = 0;
      struct drm_file *priv;

      if (offset > DRM_PROC_LIMIT) {
            *eof = 1;
            return 0;

      *start = &buf[offset];
      *eof = 0;

      DRM_PROC_PRINT("a dev   pid    uid  magic   ioctls\n\n");
      list_for_each_entry(priv, &dev->filelist, lhead) {
            DRM_PROC_PRINT("%c %3d %5d %5d %10u %10lu\n",
                         priv->authenticated ? 'y' : 'n',
                         priv->uid, priv->magic, priv->ioctl_count);

      if (len > request + offset)
            return request;
      *eof = 1;
      return len - offset;

Generated by  Doxygen 1.6.0   Back to index