Clang says this abs should be llabs.
Cherry pick quiet mode from PR #17.
update error message to mention permissions

Index: dump1090.c
--- dump1090.c.orig
+++ dump1090.c
@@ -170,6 +170,7 @@ struct {
     int debug;                      /* Debugging mode. */
     int net;                        /* Enable networking. */
     int net_only;                   /* Enable just networking. */
+    int quiet;                      /* Suppress stdout. */
     int interactive;                /* Interactive mode */
     int interactive_rows;           /* Interactive mode: max number of rows. */
     int interactive_ttl;            /* Interactive mode: TTL before deletion. */
@@ -312,6 +313,7 @@ void modesInitConfig(void) {
     Modes.interactive = 0;
     Modes.interactive_rows = MODES_INTERACTIVE_ROWS;
     Modes.interactive_ttl = MODES_INTERACTIVE_TTL;
+    Modes.quiet = 0;
     Modes.aggressive = 0;
     Modes.interactive_rows = getTermRows();
     Modes.loop = 0;
@@ -389,7 +391,7 @@ void modesInitRTLSDR(void) {
 
     device_count = rtlsdr_get_device_count();
     if (!device_count) {
-        fprintf(stderr, "No supported RTLSDR devices found.\n");
+        fprintf(stderr, "No supported RTLSDR devices found or missing permissions on device nodes.\n");
         exit(1);
     }
 
@@ -1808,7 +1810,7 @@ void useModesMessage(struct modesMessage *mm) {
             if (a && Modes.stat_sbs_connections > 0) modesSendSBSOutput(mm, a);  /* Feed SBS output clients. */
         }
         /* In non-interactive way, display messages on standard output. */
-        if (!Modes.interactive) {
+        if (!Modes.interactive && !Modes.quiet) {
             displayModesMessage(mm);
             if (!Modes.raw && !Modes.onlyaddr) printf("\n");
         }
@@ -2813,6 +2815,7 @@ void showHelp(void) {
 "--metric                 Use metric units (meters, km/h, ...).\n"
 "--snip <level>           Strip IQ file removing samples < level.\n"
 "--debug <flags>          Debug mode (verbose), see README for details.\n"
+"--quiet                  Disable output to stdout. Use for daemon applications.\n"
 "--help                   Show this help.\n"
 "\n"
 "Debug mode flags: d = Log frames decoded with errors\n"
@@ -2921,6 +2924,8 @@ int main(int argc, char **argv) {
             }
         } else if (!strcmp(argv[j],"--stats")) {
             Modes.stats = 1;
+        } else if (!strcmp(argv[j],"--quiet")) {
+            Modes.quiet = 1;
         } else if (!strcmp(argv[j],"--snip") && more) {
             snipMode(atoi(argv[++j]));
             exit(0);
