bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with directory trees "confdir-14B---" and "confdir3"


From: Peter Dyballa
Subject: Re: Problems with directory trees "confdir-14B---" and "confdir3"
Date: Tue, 19 Mar 2024 01:11:24 +0100

> Am 19.03.2024 um 00:38 schrieb Paul Eggert <eggert@cs.ucla.edu>:
> 
> ktrace rm -rf confdir-14B---

Right now I am on PPC Leopard, Mac OS X 10.5.8. No ktrace/kdump here, only 
dtrace.

Do you know how to invoke dtrace? (Did it last time presumingly decades ago on 
Solaris…)

BTW, here it's after local midnight and I feel it's close to bedtime…

I can try with ktrace in the morning on PPC Tiger, Mac OS X 10.4.11.


One more note: I could provoke the system to output to console log each in a 
series of dozens of messages like this one:

kernel Debug add_fsevent: no name hard-link! dropping the event. (event 7 vp == 
0x74acd00 (confdir-14B---)).  

To research this I split the for loop into one part that goes until 299 and a 
second one that finishes the job, outputting some diagnostics. I am a bit 
puzzled, is this correct C code:

      for (d = 0; d < desired_depth; d++)
        {   
          if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
            {   
              if (! (errno == ERANGE || errno == ENAMETOOLONG
                     || errno == ENOENT))
                fail = 3; /* Unable to construct deep hierarchy.  */
              break;
            }   
        }   

When I add an else branch do I need to write this à la:

      for (d = 0; d < desired_depth; d++)
        {   
          if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
            {   
              if (! (errno == ERANGE || errno == ENAMETOOLONG
                     || errno == ENOENT))
                {   
                fail = 3; /* Unable to construct deep hierarchy.  */
              break;
                }   
              else
                {   
                  .....
                }   
            }   
        }   

This break; has only a meaning for the for loop, but shouldn't it be inside a C 
block?

--
Greetings

             ~  O
  Pete       ~~_\\_/%
             ~  O  o




reply via email to

[Prev in Thread] Current Thread [Next in Thread]