Ticket #12555: 0001-Add-help-option-to-RemoteDesktop.patch

File 0001-Add-help-option-to-RemoteDesktop.patch, 1.2 KB (added by DarkmatterVale, 8 years ago)
  • src/apps/remotedesktop/RemoteDesktop.cpp

    From 7d5e77911871386f45700109e31bfa504da4a9ac Mon Sep 17 00:00:00 2001
    From: DarkmatterVale <valetolpegin@gmail.com>
    Date: Wed, 30 Dec 2015 09:47:12 +0000
    Subject: [PATCH 1/2] Add help option to RemoteDesktop
    
    ---
     src/apps/remotedesktop/RemoteDesktop.cpp | 9 ++++++++-
     1 file changed, 8 insertions(+), 1 deletion(-)
    
    diff --git a/src/apps/remotedesktop/RemoteDesktop.cpp b/src/apps/remotedesktop/RemoteDesktop.cpp
    index 2e48f26..da08c40 100644
    a b print_usage(const char *app)  
    2828    printf("usage:\t%s --listenOnly [-p <listenPort>]\n", app);
    2929    printf("\t%s <user@host> [-p <listenPort>] [-s <sshPort>] [-c <command>]\n",
    3030        app);
     31    printf("\t%s --help\n\n", app);
     32
     33    printf("Connect to & run applications from a different computer\n\n");
     34    printf("Arguments available for use:\n\n");
     35    printf("\t-p\t\tspecify the port to communicate on\n");
     36    printf("\t-c\t\tsend a command to the other computer\n");
     37    printf("\t-s\t\tuse ssh & specify the ssh port to communicate on\n");
    3138}
    3239
    3340
    3441int
    3542main(int argc, char *argv[])
    3643{
    37     if (argc < 2) {
     44    if (argc < 2 || strcmp(argv[1], "--help") == 0) {
    3845        print_usage(argv[0]);
    3946        return 1;
    4047    }