// SPDX-License-Identifier: GPL-2.0-only /* -*- linux-c -*- ------------------------------------------------------- * * * Copyright (C) 1991, 1992 Linus Torvalds * Copyright 2007 rPath, Inc. - All Rights Reserved * * ----------------------------------------------------------------------- */ /* * Simple command-line parser for early boot. */ #include "boot.h" static inline int myisspace(u8 c) { … } /* * Find a non-boolean option, that is, "option=argument". In accordance * with standard Linux practice, if this option is repeated, this returns * the last instance on the command line. * * Returns the length of the argument (regardless of if it was * truncated to fit in the buffer), or -1 on not found. */ int __cmdline_find_option(unsigned long cmdline_ptr, const char *option, char *buffer, int bufsize) { … } /* * Find a boolean option (like quiet,noapic,nosmp....) * * Returns the position of that option (starts counting with 1) * or 0 on not found */ int __cmdline_find_option_bool(unsigned long cmdline_ptr, const char *option) { … }