Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 713 → Rev 712

/uspace/trunk/init/version.c
File deleted
/uspace/trunk/init/init.h
File deleted
/uspace/trunk/init/version.h
File deleted
/uspace/trunk/init/init.c
26,10 → 26,12
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
 
#include "version.h"
#include <unistd.h>
#include <stdio.h>
 
int main(int argc, char *argv[])
{
version_print();
puts("Hello world\n");
while (1) ;
return 0;
}
/uspace/trunk/init/Makefile
37,8 → 37,7
 
OUTPUT = init
SOURCES = \
init.c \
version.c
init.c
 
OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
 
/uspace/trunk/libc/include/libc.h
32,11 → 32,6
#include <types.h>
 
 
#define __SYSCALL0(id) __syscall(id, 0, 0, 0)
#define __SYSCALL1(id, p1) __syscall(id, p1, 0, 0)
#define __SYSCALL2(id, p1, p2) __syscall(id, p1, p2, 0)
 
 
typedef enum {
SYS_CTL = 0,
SYS_IO = 1
/uspace/trunk/libc/include/unistd.h
34,6 → 34,5
#define NULL 0
 
extern ssize_t write(int fd, const void * buf, size_t count);
extern void _exit(int status);
 
#endif
/uspace/trunk/libc/generic/io.c
30,19 → 30,15
#include <unistd.h>
#include <stdio.h>
 
static char nl = '\n';
 
int puts(const char * str)
{
size_t count;
for (count = 0; str[count] != 0; count++);
if (write(1, (void * ) str, count) == count) {
if (write(1, &nl, 1) == 1)
return 0;
}
return EOF;
if (write(1, (void * ) str, count) == count)
return 0;
else
return EOF;
}
 
ssize_t write(int fd, const void * buf, size_t count)
/uspace/trunk/libc/generic/libc.c
29,13 → 29,8
#include <libc.h>
#include <unistd.h>
 
void _exit(int status) {
__SYSCALL0(SYS_CTL);
}
 
void __main(void) {
}
 
void __exit(void) {
_exit(0);
}