Linux preempt-rt

Check our new training course

Real-Time Linux with PREEMPT_RT

Check our new training course
with Creative Commons CC-BY-SA
lecture and lab materials

Bootlin logo

Elixir Cross Referencer

#include "internal.h"
#include <stdio.h>

const char	pwd_usage[] = "Print the current directory.\n";

extern int
pwd_main(struct FileInfo * i, int argc, char * * argv)
{
	char		buf[1024];

	if ( getcwd(buf, sizeof(buf)) == NULL ) {
		name_and_error("get working directory");
		return 1;
	}

	printf("%s\n", buf);
	return 0;
}