A clone of btpd with my configuration changes.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 line
525 B

  1. #include "btcli.h"
  2. void
  3. usage_del(void)
  4. {
  5. printf(
  6. "Remove torrents from btpd.\n"
  7. "\n"
  8. "Usage: del torrent ...\n"
  9. "\n"
  10. "Arguments:\n"
  11. "file ...\n"
  12. "\tThe torrents to remove.\n"
  13. "\n");
  14. exit(1);
  15. }
  16. void
  17. cmd_del(int argc, char **argv)
  18. {
  19. struct ipc_torrent t;
  20. if (argc < 2)
  21. usage_del();
  22. btpd_connect();
  23. for (int i = 1; i < argc; i++)
  24. if (torrent_spec(argv[i], &t))
  25. handle_ipc_res(btpd_del(ipc, &t), argv[i]);
  26. }