Skip to content
This repository has been archived by the owner on Dec 14, 2022. It is now read-only.

Commit

Permalink
tools vm: Fix build due to removal of tools/lib/api/fs/debugfs.h
Browse files Browse the repository at this point in the history
There were some changes in how this debugfs mounting helper is
implemented/exported and we forgot to check if there were other users
besides perf, fix it.

Need to do a make -C tools/ everytime we do changes to
tools/{lib,include} and other places where we're moving things from
tools/perf/ to be used by other tools/ living code.

Fixed:

  $ make -C tools/vm
  make: Entering directory '/home/git/linux/tools/vm'
  make -C ../lib/api
  make[1]: Entering directory '/home/git/linux/tools/lib/api'
    CC       fd/array.o
    LD       fd/libapi-in.o
    CC       fs/fs.o
    CC       fs/tracing_path.o
    LD       fs/libapi-in.o
    CC       cpu.o
    LD       libapi-in.o
    AR       libapi.a
  make[1]: Leaving directory '/home/git/linux/tools/lib/api'
  gcc -Wall -Wextra -I../lib/ -o page-types page-types.c ../lib/api/libapi.a
  make: Leaving directory '/home/git/linux/tools/vm'
  $

Reported-by: Vinson Lee <[email protected]>
Tested-by: Vinson Lee <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Matt Fleming <[email protected]>
Cc: Raphael Beamonte <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Namhyung Kim <[email protected]>
Fixes: 60a1133 ("tools lib api fs: Remove debugfs, tracefs and findfs objects")
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
  • Loading branch information
acmel committed Sep 23, 2015
1 parent 96d8bf7 commit f6489bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/vm/page-types.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#include <sys/mman.h>
#include "../../include/uapi/linux/magic.h"
#include "../../include/uapi/linux/kernel-page-flags.h"
#include <api/fs/debugfs.h>
#include <api/fs/fs.h>

#ifndef MAX_PATH
# define MAX_PATH 256
Expand Down Expand Up @@ -188,7 +188,7 @@ static int kpageflags_fd;
static int opt_hwpoison;
static int opt_unpoison;

static char *hwpoison_debug_fs;
static const char *hwpoison_debug_fs;
static int hwpoison_inject_fd;
static int hwpoison_forget_fd;

Expand Down Expand Up @@ -487,7 +487,7 @@ static void prepare_hwpoison_fd(void)
{
char buf[MAX_PATH + 1];

hwpoison_debug_fs = debugfs_mount(NULL);
hwpoison_debug_fs = debugfs__mount();
if (!hwpoison_debug_fs) {
perror("mount debugfs");
exit(EXIT_FAILURE);
Expand Down

0 comments on commit f6489bc

Please sign in to comment.