~ubuntu-branches/ubuntu/intrepid/sg3-utils/intrepid

« back to all changes in this revision

Viewing changes to archive/sg_poll.c

  • Committer: Bazaar Package Importer
  • Author(s): Luk Claes
  • Date: 2006-11-05 17:23:29 UTC
  • mfrom: (1.1.4 upstream) (3.1.2 edgy)
  • Revision ID: james.westby@ubuntu.com-20061105172329-l4loha00sk36qz6k
* Non-maintainer upload.
* Fix FTBFS due to old syscall usage (Closes: #395512).

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
#include <sys/poll.h>
14
14
#include <sys/ipc.h>
15
15
#include <sys/sem.h>
16
 
#include "sg_include.h"
17
 
#include "sg_err.h"
 
16
#include "sg_lib.h"
 
17
#include "sg_io_linux.h"
18
18
 
19
19
/* Test code for D. Gilbert's extensions to the Linux OS SCSI generic ("sg")
20
20
   device driver.
101
101
{
102
102
    signo = sig;
103
103
    if (SIGRTMIN != sig)
104
 
        fprintf(stderr, "Unexpected signal, signum=%d\n", sig);
 
104
        fprintf(stderr, "Unexpected signal, signum=%d\n", sig);
105
105
    if (sg_fd != si->si_fd)
106
 
        fprintf(stderr, "Unexpected fd, fd=%d\n", si->si_fd);
 
106
        fprintf(stderr, "Unexpected fd, fd=%d\n", si->si_fd);
107
107
    ++hand_count;
108
108
    if (do_poll()) {
109
109
        struct sembuf a_sembuf;
314
314
    }
315
315
    sg_chk_n_print("after read(rd)", rsghp->target_status, 
316
316
                   rsghp->host_status, rsghp->driver_status, 
317
 
                   rsghp->sense_buffer, SG_MAX_SENSE);
 
317
                   rsghp->sense_buffer, SG_MAX_SENSE, 1);
318
318
 
319
319
    }
320
320
    printf("\treq_len=%d, dma_count=%d\n", rsghp->reply_len, rsghp->pack_len);