[BACK]Return to mixerctl.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mixerctl

Diff for /src/usr.bin/mixerctl/mixerctl.c between version 1.32 and 1.33

version 1.32, 2019/06/28 13:35:02 version 1.33, 2020/04/04 08:43:08
Line 249 
Line 249 
         int ndev;          int ndev;
   
         if ((file = getenv("MIXERDEVICE")) == 0 || *file == '\0')          if ((file = getenv("MIXERDEVICE")) == 0 || *file == '\0')
                 file = "/dev/mixer";                  file = "/dev/audioctl0";
   
         while ((ch = getopt(argc, argv, "af:nqtvw")) != -1) {          while ((ch = getopt(argc, argv, "af:nqtvw")) != -1) {
                 switch (ch) {                  switch (ch) {
Line 284 
Line 284 
         if (argc == 0 && tflag == 0)          if (argc == 0 && tflag == 0)
                 aflag = 1;                  aflag = 1;
   
         if (unveil(file, "rw") == -1)          if (unveil(file, "w") == -1)
                 err(1, "unveil");                  err(1, "unveil");
   
         if ((fd = open(file, O_RDWR)) == -1) {  
                 if (unveil(file, "r") == -1)  
                         err(1, "unveil");  
   
                 if ((fd = open(file, O_RDONLY)) == -1)  
                         err(1, "%s", file);  
         }  
   
         if (unveil(NULL, NULL) == -1)          if (unveil(NULL, NULL) == -1)
                 err(1, "unveil");                  err(1, "unveil");
   
           if ((fd = open(file, O_WRONLY)) == -1)
                   err(1, "%s", file);
   
         for (ndev = 0; ; ndev++) {          for (ndev = 0; ; ndev++) {
                 dinfo.index = ndev;                  dinfo.index = ndev;

Legend:
Removed from v.1.32  
changed lines
  Added in v.1.33