Ignore:
Timestamp:
Mar 7, 2024, 1:55:18 PM (8 weeks ago)
Author:
Bruno Cornec
Message:

Change find_my_editor and find_home_of_exe to return dynamically assigned stringsi - adapt whine_if_not_found

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.3/mondo/src/common/libmondo-filelist.c

    r3753 r3866  
    654654
    655655
    656 int set_fattr_list(char *masklist, char *fattr_fname)
    657 {
    658     if (find_home_of_exe("setfattr")) {
    659         return (set_EXAT_list(masklist, fattr_fname, "setfattr"));
     656int set_fattr_list(char *masklist, char *fattr_fname) {
     657
     658    int i = 0;
     659    char * tmp = NULL;
     660
     661    if ((tmp = find_home_of_exe("setfattr")) != NULL) {
     662        i = set_EXAT_list(masklist, fattr_fname, tmp)
     663        mr_free(tmp);
    660664    } else {
    661665        log_msg(1, "ERROR: set_EXAT_list: setfattr doesn't exist");
    662         return(0);
    663     }
    664 }
    665 
    666 
    667 
    668 int set_acl_list(char *masklist, char *acl_fname)
    669 {
    670     if (find_home_of_exe("setfacl")) {
    671         return (set_EXAT_list(masklist, acl_fname, "setfacl"));
     666    }
     667    return(i);
     668}
     669
     670
     671
     672int set_acl_list(char *masklist, char *acl_fname) {
     673
     674    int i = 0;
     675    char * tmp = NULL;
     676
     677    if ((tmp = find_home_of_exe("setfacl")) != NULL) {
     678        i = set_EXAT_list(masklist, facl_fname, tmp)
     679        mr_free(tmp);
    672680    } else {
    673681        log_msg(1, "ERROR: set_EXAT_list: setfacl doesn't exist");
    674         return(0);
    675     }
     682    }
     683    return(i);
    676684}
    677685
Note: See TracChangeset for help on using the changeset viewer.