|
|
| version 1.42, 2025/05/13 20:03:53 | version 1.43, 2026/03/24 00:25:36 |
|---|---|
| Line 24 | Line 24 |
| * along with FreeM. If not, see <https://www.gnu.org/licenses/>. | * along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
| * | * |
| * $Log$ | * $Log$ |
| * Revision 1.43 2026/03/24 00:25:36 snw | |
| * Fix segfault when running \'fmadm status\' without a second argument | |
| * | |
| * Revision 1.42 2025/05/13 20:03:53 snw | * Revision 1.42 2025/05/13 20:03:53 snw |
| * Error-check fopen in fm_daemonctl | * Error-check fopen in fm_daemonctl |
| * | * |
| Line 433 int main (int argc, char **argv) | Line 436 int main (int argc, char **argv) |
| obj = OBJ_DAEMON; | obj = OBJ_DAEMON; |
| goto process_args; | goto process_args; |
| } | } |
| else if (strcmp (argv[1], "status") == 0 && strcmp (argv[2], "environment") == 0) { | else if (strcmp (argv[1], "status") == 0) { |
| act = ACT_STATUS; | if (argc < 3) { |
| obj = OBJ_DAEMON; | fprintf (stderr, "fmadm: did you mean 'fmadm status environment'?\r\n"); |
| goto process_args; | exit (1); |
| } | |
| if (strcmp (argv[2], "environment") == 0) { | |
| act = ACT_STATUS; | |
| obj = OBJ_DAEMON; | |
| goto process_args; | |
| } | |
| else { | |
| fmadm_usage (); | |
| exit (1); | |
| } | |
| } | } |
| } | } |