/[rdesktop]/sourceforge.net/trunk/rdesktop/parallel.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/rdesktop/parallel.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 589 by n-ki, Thu Jan 29 12:24:15 2004 UTC revision 592 by n-ki, Fri Jan 30 14:10:32 2004 UTC
# Line 64  parallel_enum_devices(int *id, char *opt Line 64  parallel_enum_devices(int *id, char *opt
64  }  }
65    
66  static NTSTATUS  static NTSTATUS
67  parallel_create(uint32 device_id, uint32 access, uint32 share_mode, uint32 disposition, uint32 flags,  parallel_create(uint32 device_id, uint32 access, uint32 share_mode, uint32 disposition,
68                 char *filename, HANDLE * handle)                  uint32 flags, char *filename, HANDLE * handle)
69  {  {
70          int parallel_fd;          int parallel_fd;
71    
72          parallel_fd = open(g_rdpdr_device[device_id].local_path, O_RDWR);          parallel_fd = open(g_rdpdr_device[device_id].local_path, O_RDWR);
73          if (parallel_fd == -1) {          if (parallel_fd == -1)
74            {
75                  perror("open");                  perror("open");
76                  return STATUS_ACCESS_DENIED;                  return STATUS_ACCESS_DENIED;
77          }          }
# Line 78  parallel_create(uint32 device_id, uint32 Line 79  parallel_create(uint32 device_id, uint32
79          g_rdpdr_device[device_id].handle = parallel_fd;          g_rdpdr_device[device_id].handle = parallel_fd;
80    
81          *handle = parallel_fd;          *handle = parallel_fd;
82    
83            /* all read and writes should be non blocking */
84            if (fcntl(*handle, F_SETFL, O_NONBLOCK) == -1)
85                    perror("fcntl");
86    
87          return STATUS_SUCCESS;          return STATUS_SUCCESS;
88  }  }
89    

Legend:
Removed from v.589  
changed lines
  Added in v.592

  ViewVC Help
Powered by ViewVC 1.1.26