The "full_str_name[strlen(full_str_name)-1] = '\0'; // chop trailing \n" is there because str_name was returned with a trailing \n; that is, it looks something like "sr0\n" when it should read "sr0".
The "full_str_ name[strlen( full_str_ name)-1] = '\0'; // chop trailing \n" is there because str_name was returned with a trailing \n; that is, it looks something like "sr0\n" when it should read "sr0".