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

Re: [MiNT] "pid 80 (conholio) : unifs: couldn't match a drive with a directory"



Alan Hourihane wrote:
Sure, please do. It sounds Aranym specific anyway.

Here is a test GEM program.
It calls getcwd() and displays the result in a message box.

I have tested it with MiNT 1.16.
It works well on FAT16 and ext2 partitions.

On ARAnyM's hostfs drives, getcwd() fails with ENOTDIR.
In any case, it works well from U:\

--
Vincent Rivière
#include <gem.h>
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>

int main(int argc, char* argv[])
{
	char cwd[500];
	char msg[1000];

        appl_init();

	if (!getcwd(cwd, sizeof cwd))
	{
		sprintf(msg, FA_STOP "[getcwd(): errno = %d|%s][OK]", errno, strerror(errno));
		form_alert(1, msg);
		appl_exit();
		return 1;
	}
	
	sprintf(msg, FA_INFO "[cwd = %s][OK]", cwd);
	form_alert(1, msg);

        appl_exit();

	return 0;
}