1. 10 3月, 2011 2 次提交
  2. 14 10月, 2010 1 次提交
  3. 09 10月, 2010 1 次提交
    • R
      Phonet: cleanup pipe enable socket option · 03789f26
      Rémi Denis-Courmont 提交于
      The current code works like this:
      
        int garbage, status;
        socklen_t len = sizeof(status);
      
        /* enable pipe */
        setsockopt(fd, SOL_PNPIPE, PNPIPE_ENABLE, &garbage, sizeof(garbage));
        /* disable pipe */
        setsockopt(fd, SOL_PNPIPE, PNPIPE_DISABLE, &garbage, sizeof(garbage));
        /* get status */
        getsockopt(fd, SOL_PNPIPE, PNPIPE_INQ, &status, &len);
      
      ...which does not follow the usual socket option pattern. This patch
      merges all three "options" into a single gettable&settable option,
      before Linux 2.6.37 gets out:
      
        int status;
        socklen_t len = sizeof(status);
      
        /* enable pipe */
        status = 1;
        setsockopt(fd, SOL_PNPIPE, PNPIPE_ENABLE, &status, sizeof(status));
        /* disable pipe */
        status = 0;
        setsockopt(fd, SOL_PNPIPE, PNPIPE_ENABLE, &status, sizeof(status));
        /* get status */
        getsockopt(fd, SOL_PNPIPE, PNPIPE_ENABLE, &status, &len);
      
      This also fixes the error code from EFAULT to ENOTCONN.
      Signed-off-by: NRémi Denis-Courmont <remi.denis-courmont@nokia.com>
      Cc: Kumar Sanghvi <kumar.sanghvi@stericsson.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      03789f26
  4. 28 9月, 2010 1 次提交
  5. 16 9月, 2010 1 次提交
  6. 13 6月, 2009 1 次提交
  7. 15 10月, 2008 1 次提交
  8. 06 10月, 2008 1 次提交
  9. 30 9月, 2008 1 次提交
  10. 23 9月, 2008 1 次提交