Changeset d7e76f


Ignore:
Timestamp:
12/27/11 11:14:16 (17 months ago)
Author:
Micke Prag <micke.prag@…>
Branches:
('master', 'a231b56d57a69513303d0061f5fa3e3cd51c85c1')('controller-upgrade', '72b31cc86eeeef18f1371a3067b6e8a5ca21abfc')('windows_service_fixes', 'df6bd2788365991d36d5af2a75833b8de2a5860f')
Children:
72188ef02f352e9596781d57280c2bff6dfca357
Parents:
e3587763eeea11df1605cd14a9d36fef88d29511
git-author:
Micke Prag <micke.prag@telldus.se>2011-10-26 17:02:34+02:00
git-committer:
Micke Prag <micke.prag@telldus.se>2011-12-27 11:14:16+01:00
Message:

Show an error message if an unknown option is supplied to telldusd in Linux

File:
1 edited

Legend:

Unmodified
Added
Removed
  • telldus-core/service/main_unix.cpp

    r55f49a rd7e76f  
    4747                if (strcmp(argv[i], "--nodaemon") == 0) { 
    4848                        deamonize = false; 
    49                 } 
    50                 if (strcmp(argv[i], "--help") == 0) { 
     49                } else if (strcmp(argv[i], "--help") == 0) { 
    5150                        printf("Telldus TellStick background service\n\nStart with --nodaemon to not run as daemon\n\n"); 
    5251                        printf("Report bugs to <info.tech@telldus.com>\n"); 
    5352                        exit(EXIT_SUCCESS); 
    54                 } 
    55                 if (strcmp(argv[i], "--version") == 0) { 
     53                } else if (strcmp(argv[i], "--version") == 0) { 
    5654                        printf("telldusd " VERSION "\n\n"); 
    5755                        printf("Copyright (C) 2011 Telldus Technologies AB\n\n"); 
    5856                        printf("Written by Micke Prag <micke.prag@telldus.se>\n"); 
    5957                        exit(EXIT_SUCCESS); 
     58                } else { 
     59                        printf("Unknown option %s\n", argv[i]); 
     60                        exit(EXIT_FAILURE); 
    6061                } 
    6162        } 
Note: See TracChangeset for help on using the changeset viewer.