fork of PCE focusing on macplus, supporting DaynaPort SCSI network emulation
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

macplus: Run tap command before opening it

The command may need to change permissions to allow us to open it in
the first place.

+5 -5
+5 -5
src/arch/macplus/scsi_net.c
··· 45 45 46 46 dev->tap_fd = -1; 47 47 48 - if ((dev->tap_fd = open (dev->tap_dev, O_RDWR)) < 0) { 49 - pce_log (MSG_ERR, "*** opening %s failed (%s)\n", dev->tap_dev, strerror(errno)); 50 - return - 1; 51 - } 52 - 53 48 if (dev->tap_cmd[0] != '\0') { 54 49 /* run command with args "/dev/tap0" "00:00:00:00:00:00" */ 55 50 snprintf (tap_cmd_sh, sizeof(tap_cmd_sh), "%s \"%s\" \"%02x:%02x:%02x:%02x:%02x:%02x\"", ··· 65 60 if (system (tap_cmd_sh) != 0) { 66 61 pce_log (MSG_ERR, "*** tap command failed (%s)\n", strerror(errno)); 67 62 } 63 + } 64 + 65 + if ((dev->tap_fd = open (dev->tap_dev, O_RDWR)) < 0) { 66 + pce_log (MSG_ERR, "*** opening %s failed (%s)\n", dev->tap_dev, strerror(errno)); 67 + return - 1; 68 68 } 69 69 #endif 70 70