120-fix_create_mode.patch 312 B

1234567891011
  1. --- a/kernel2minor.c
  2. +++ b/kernel2minor.c
  3. @@ -622,7 +622,7 @@ int main(int argc, char *argv[]){
  4. perror("Can't open kernel file");
  5. exit(-1);
  6. }
  7. - r = creat(res_file, 0);
  8. + r = open(res_file, O_CREAT | O_TRUNC | O_WRONLY, 0644);
  9. if(r <= 0){
  10. perror("Can't create result file");
  11. close(k);