mem.c (36ec807b627b4c0a0a382f0ae48eac7187d14b2b) mem.c (32e8eaf263d9be014ba1970444f745682fa9c6c0)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
4 */
5
6#include <stdio.h>
7#include <stddef.h>
8#include <stdlib.h>

--- 28 unchanged lines hidden (view full) ---

37 0) == MAP_FAILED) {
38 os_info("Couldn't allocate shadow memory: %s\n.",
39 strerror(errno));
40 exit(1);
41 }
42}
43
44/* Set by make_tempfile() during early boot. */
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
4 */
5
6#include <stdio.h>
7#include <stddef.h>
8#include <stdlib.h>

--- 28 unchanged lines hidden (view full) ---

37 0) == MAP_FAILED) {
38 os_info("Couldn't allocate shadow memory: %s\n.",
39 strerror(errno));
40 exit(1);
41 }
42}
43
44/* Set by make_tempfile() during early boot. */
45static char *tempdir = NULL;
45char *tempdir = NULL;
46
47/* Check if dir is on tmpfs. Return 0 if yes, -1 if no or error. */
48static int __init check_tmpfs(const char *dir)
49{
50 struct statfs st;
51
52 os_info("Checking if %s is on tmpfs...", dir);
53 if (statfs(dir, &st) < 0) {

--- 181 unchanged lines hidden ---
46
47/* Check if dir is on tmpfs. Return 0 if yes, -1 if no or error. */
48static int __init check_tmpfs(const char *dir)
49{
50 struct statfs st;
51
52 os_info("Checking if %s is on tmpfs...", dir);
53 if (statfs(dir, &st) < 0) {

--- 181 unchanged lines hidden ---