prepare to upload
[debian/gcpegg] / reg_pear.c
index bc79bb702920bd432bfb6ba07a5a38ccf613505d..0ff329959eb4735ff53c52f09a403bd1adda84f9 100644 (file)
@@ -77,7 +77,7 @@ static int32 OpenDev(DevOpts *opts) {
   sprintf(ttydev, "/dev/term/%c", 'a' + (opts->port - 1));
 #endif
 #else
-  sprintf(ttydev, "/dev/ttyS%d", opts->port);
+  sprintf(ttydev, "/dev/REG", opts->port);
 #endif
 
   switch(opts->baud) {
@@ -91,11 +91,11 @@ static int32 OpenDev(DevOpts *opts) {
   case 115200: baudcon = B115200; break;
 #endif
   default:
-    printf("%s: Baud rate %ld not supported.\n", pgmname, opts->baud);
+    printf("%s: Baud rate %d not supported.\n", pgmname, opts->baud);
     return -1;
   }
 
-  fprintf(stderr, "Opening %s at %ld\n", ttydev, opts->baud);
+  fprintf(stderr, "Opening %s at %d\n", ttydev, opts->baud);
   if ((TTY_fd = open(ttydev, O_RDONLY
 #ifdef CPU_BOUND
                                    | O_NDELAY
@@ -122,7 +122,9 @@ static int32 OpenDev(DevOpts *opts) {
 #else
   res = cfsetospeed(&tt, baudcon); 
   cfmakeraw(&tt);
+#if !defined(__FreeBSD_kernel__)
   tt.c_oflag &= (~(TABDLY | ONLCR));
+#endif
 #endif
   res = tcsetattr(TTY_fd, TCSANOW, &tt);