<div dir="ltr"><div class="gmail-contents-2MsGLg"> </div><div class="gmail-contents-2MsGLg"> </div><div class="gmail-contents-2MsGLg"> </div><li id="gmail-chat-messages-820452222848335924-1081672587823824896" class="gmail-messageListItem-ZZ7v6g"><div class="gmail-message-2CShn3 gmail-cozyMessage-1DWF9U gmail-groupStart-3Mlgv1 gmail-wrapper-30-Nkg gmail-cozy-VmLDNB gmail-zalgo-26OfGz" role="article" tabindex="-1" aria-labelledby="message-username-1081672587823824896 uid_4 message-content-1081672587823824896 uid_5 message-timestamp-1081672587823824896"><div class="gmail-contents-2MsGLg"><div id="gmail-message-content-1081672587823824896" class="gmail-markup-eYLPri gmail-messageContent-2t3eCI">hi guys i am working on #4674</div></div></div></li><li id="gmail-chat-messages-820452222848335924-1081672663614902343" class="gmail-messageListItem-ZZ7v6g"><div class="gmail-message-2CShn3 gmail-cozyMessage-1DWF9U gmail-wrapper-30-Nkg gmail-cozy-VmLDNB gmail-zalgo-26OfGz" role="article" tabindex="-1" aria-labelledby="message-username-1081672587823824896 uid_4 message-content-1081672663614902343 uid_5 message-timestamp-1081672663614902343"><div class="gmail-contents-2MsGLg"><div id="gmail-message-content-1081672663614902343" class="gmail-markup-eYLPri gmail-messageContent-2t3eCI">currently i'm not able to get it to produce the error</div></div></div></li><li id="gmail-chat-messages-820452222848335924-1081672792707170374" class="gmail-messageListItem-ZZ7v6g"><div class="gmail-message-2CShn3 gmail-cozyMessage-1DWF9U gmail-wrapper-30-Nkg gmail-cozy-VmLDNB gmail-zalgo-26OfGz" role="article" tabindex="-1" aria-labelledby="message-username-1081672587823824896 uid_4 message-content-1081672792707170374 uid_5 message-timestamp-1081672792707170374"><div class="gmail-contents-2MsGLg"><div id="gmail-message-content-1081672792707170374" class="gmail-markup-eYLPri gmail-messageContent-2t3eCI">my code looks like this</div></div></div></li><li id="gmail-chat-messages-820452222848335924-1081672792707170374" class="gmail-messageListItem-ZZ7v6g"><div id="gmail-message-content-1081672959921508453" class="gmail-markup-eYLPri gmail-messageContent-2t3eCI"><pre><code class="gmail-scrollbarGhostHairline-2LpzZ9 gmail-scrollbar-3vVt8d gmail-hljs">#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <dirent.h>
#include <stdio.h>
#include <sys/types.h>
#include <fcntl.h>
#include <dirent.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <rtems/imfs.h>
const char rtems_test_name[] = "FSREADDIR ";
int test( void );
int test( void )
{
char *many_files[] = {"a", "b","c"};
printf( "\nchdir to the root directory\n" );
int status = chdir( "/" );
printf( "chdir() status : %d\n\n", status );
for (int i = 0; i<3; i++) {
printf("Create %s\n", many_files[i]);
int fd = open (many_files[i], O_CREAT, S_IRWXU);
close (fd);
}
struct dirent* direntp;
DIR* dirp;
dirp = opendir( "/" );
if( dirp != NULL ) {
for(;;) {
direntp = readdir( dirp );
if( direntp == NULL ) break;
printf( "%s\n", direntp->d_name );
}
closedir( dirp );
}
status = unlink("/b");
printf( "removing the second directory : %d\n\n", status );
dirp = opendir( "/" );
if( dirp != NULL ) {
for(;;) {
direntp = readdir( dirp );
if( direntp == NULL ) break;
printf( "%s\n", direntp->d_name );
}
closedir( dirp );
}
return 0;
}</code></pre> <span class="gmail-timestamp-p1Df1m"></span></div><div class="gmail-buttonContainer-1502pf"><div class="gmail-buttons-3dF5Kd gmail-container-2gUZhU" role="group" aria-label="Message Actions"></div></div><div class="gmail-contents-2MsGLg"> </div>Am i unlinking it correctly?</li></div>