• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2022 The ChromiumOS Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 use std::fs::OpenOptions;
6 use std::os::windows::fs::OpenOptionsExt;
7 
8 use winapi::um::winnt::FILE_SHARE_READ;
9 
set_extra_open_opts(opts: &mut OpenOptions)10 pub fn set_extra_open_opts(opts: &mut OpenOptions) {
11     // Allow other applications to read the memory region. This is useful when
12     // folks want to tail the pstore file, and would fail without this setting.
13     opts.share_mode(FILE_SHARE_READ);
14 }
15