]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
Serial console: Automatic fixes of whitespace.
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 16 Sep 2009 13:41:52 +0000 (15:41 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 16 Sep 2009 13:41:52 +0000 (15:41 +0200)
src/initscripts/src/console_check.c
src/initscripts/src/securetty.c

index 9ecbb036dfd22496bd8473c6a2492cbf6c60ef86..f03cd90192b1813dd190154b9121e20ed5489633 100644 (file)
@@ -55,15 +55,15 @@ int termcmp(struct termios *a, struct termios *b) {
            cfgetispeed(a) != cfgetispeed(b) || cfgetospeed(a) != cfgetospeed(b))
                return 1;
        return memcmp(a->c_cc, b->c_cc, sizeof(a->c_cc));
-}       
+}
 
 int get_serial_speed(int fd) {
        struct termios mode;
-       
+
        if (!tcgetattr(fd, &mode)) {
                int i;
                speed_t speed;
-               
+
                speed = cfgetospeed(&mode);
                for (i = 0; speed_map[i].value != 0; i++)
                        if (speed_map[i].speed == speed)
@@ -151,18 +151,18 @@ out:
 
 int emit_console_event(char *dev, int speed) {
        char *args[] = { "initctl", "emit", "--no-wait", "serial-console-available", NULL, NULL, NULL };
-       
+
        args[4] = dev;
        if (speed)
                asprintf(&args[5],"%d",speed);
        execv("/sbin/initctl", args);
-       return 1;       
+       return 1;
 }
 
 int main(int argc, char **argv) {
        char *device;
        int speed;
-       
+
        if (argc < 2) {
                printf("usage: console_check <device>\n");
                exit(1);
index f1505076fc18b9a7bd712090d97b21374435c808..9bdc8c2266f137ff43c18afd58f96f98df303758 100644 (file)
@@ -19,12 +19,12 @@ int open_and_lock_securetty() {
         int fd;
         struct flock lock;
         struct sigaction act, oldact;
-        
+
         lock.l_type = F_WRLCK;
         lock.l_whence = SEEK_SET;
         lock.l_start = 0;
         lock.l_len = 0;
-      
+
         fd = open("/etc/securetty", O_RDWR);
         if (fd == -1) {
                 syslog(LOG_ERR, "Couldn't open /etc/securetty: %s",strerror(errno));
@@ -51,7 +51,7 @@ int rewrite_securetty(char *terminal) {
         int fd;
         char *buf, *pos;
         struct stat sbuf;
-        
+
         fd = open_and_lock_securetty();
         if (fd == -1)
                 return 1;