Minor update for get_machine.c
This commit is contained in:
parent
ea9748946e
commit
ed2dc916dd
|
@ -22,6 +22,7 @@ Added support for envp in cc_x86.s
|
|||
Reduced stack usage thanks to akkartik
|
||||
Changed argv, argc behavior in cc_x86.s
|
||||
updated stage3/M2-Planet_x86.c to commit 56db0fcad4b3362d14d20e69a17e45d751c264a5
|
||||
updated stage3/get_machine.c to new form for M2-Planet
|
||||
|
||||
** Fixed
|
||||
Add debug label
|
||||
|
|
|
@ -1,22 +1,24 @@
|
|||
## This file was generated by running:
|
||||
## cat functions/exit.c functions/file.c functions/file_print.c functions/malloc.c functions/calloc.c functions/uname.c test/test24/get_machine.c >| ../stage0/stage3/get_machine_x86.c
|
||||
## inside M2-Planet's repo
|
||||
## inside stage0's repo
|
||||
|
||||
/* Copyright (C) 2016 Jeremiah Orians
|
||||
* This file is part of stage0.
|
||||
*
|
||||
* stage0 is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* stage0 is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
## Copyright (C) 2016 Jeremiah Orians
|
||||
## This file is part of stage0.
|
||||
##
|
||||
## stage0 is free software: you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
## the Free Software Foundation, either version 3 of the License, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## stage0 is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
## GNU General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||
// CONSTANT EXIT_FAILURE 1
|
||||
// CONSTANT EXIT_SUCCESS 0
|
||||
|
||||
|
@ -157,21 +159,23 @@ void file_print(char* s, FILE* f)
|
|||
s = s + 1;
|
||||
}
|
||||
}
|
||||
## Copyright (C) 2016 Jeremiah Orians
|
||||
## This file is part of stage0.
|
||||
##
|
||||
## stage0 is free software: you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
## the Free Software Foundation, either version 3 of the License, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## stage0 is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
## GNU General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||
/* Copyright (C) 2016 Jeremiah Orians
|
||||
* This file is part of stage0.
|
||||
*
|
||||
* stage0 is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* stage0 is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// CONSTANT NULL 0
|
||||
|
||||
void* malloc(int size)
|
||||
|
@ -252,11 +256,11 @@ void free(void* l)
|
|||
|
||||
struct utsname
|
||||
{
|
||||
char** sysname[65]; /* Operating system name (e.g., "Linux") */
|
||||
char** nodename[65]; /* Name within "some implementation-defined network" */
|
||||
char** release[65]; /* Operating system release (e.g., "2.6.28") */
|
||||
char** version[65]; /* Operating system version */
|
||||
char** machine[65]; /* Hardware identifier */
|
||||
char sysname[65]; /* Operating system name (e.g., "Linux") */
|
||||
char nodename[65]; /* Name within "some implementation-defined network" */
|
||||
char release[65]; /* Operating system release (e.g., "2.6.28") */
|
||||
char version[65]; /* Operating system version */
|
||||
char machine[65]; /* Hardware identifier */
|
||||
};
|
||||
|
||||
int uname(struct utsname* unameData)
|
||||
|
|
Loading…
Reference in New Issue